From: Daniel Carl Date: Mon, 1 Dec 2014 23:34:11 +0000 (+0100) Subject: Don't add empty modes in kioskmode. X-Git-Url: https://git.owens.tech///git?a=commitdiff_plain;h=1efe51a7091cb38300ff30c02cc142911863d715;p=vimb.git Don't add empty modes in kioskmode. It does not disturb to have modes with never called callbacks, so save the condition and the additional code block and setup the modes like normal. --- diff --git a/src/main.c b/src/main.c index 7384d34..fe4f24b 100644 --- a/src/main.c +++ b/src/main.c @@ -836,17 +836,10 @@ static void init_core(void) /* initialize the modes */ mode_init(); - 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); - } + 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); /* initialize the marks with empty values */ marks_clear();