From: Daniel Carl Date: Fri, 1 Aug 2014 14:58:03 +0000 (+0200) Subject: Add dummy modes for kiosk mode. X-Git-Url: https://git.owens.tech/git.owens.tech/git.owens.tech/git?a=commitdiff_plain;h=9a9c29fff54dc7c99afc3270c9a25365745a812e;p=vimb.git Add dummy modes for kiosk mode. This allows us to keep the mode_enter() calls in the code untouched, because all modes are still available, event if they don't do anything. --- diff --git a/src/main.c b/src/main.c index 3112cf4..f257876 100644 --- a/src/main.c +++ b/src/main.c @@ -778,11 +778,16 @@ static void init_core(void) /* initialize the modes */ mode_init(); - mode_add('n', normal_enter, normal_leave, normal_keypress, NULL); if (!vb.config.kioskmode) { + mode_add('n', normal_enter, normal_leave, normal_keypress, NULL); mode_add('c', ex_enter, ex_leave, ex_keypress, ex_input_changed); mode_add('i', input_enter, input_leave, input_keypress, NULL); mode_add('p', pass_enter, pass_leave, pass_keypress, NULL); + } else { + mode_add('n', NULL, NULL, NULL, NULL); + mode_add('c', NULL, NULL, NULL, NULL); + mode_add('i', NULL, NULL, NULL, NULL); + mode_add('p', NULL, NULL, NULL, NULL); } /* initialize the marks with empty values */