From 1efe51a7091cb38300ff30c02cc142911863d715 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Tue, 2 Dec 2014 00:34:11 +0100 Subject: [PATCH] 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. --- src/main.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) 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(); -- 2.20.1