From a4ea559b4209e60502616f3b8a3b698bfe959b93 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Sat, 9 Nov 2013 01:39:03 +0100 Subject: [PATCH] Setup the signal handlers as late as possible. --- src/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 54022ab..2531bcd 100644 --- a/src/main.c +++ b/src/main.c @@ -638,15 +638,12 @@ static void init_core(void) gtk_box_pack_start(gui->box, gui->eventbox, false, false, 0); gtk_box_pack_end(gui->box, gui->input, false, false, 0); - setup_signals(); - /* initialize the modes */ mode_init(); 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); - mode_enter('n'); init_files(); session_init(); @@ -657,6 +654,11 @@ static void init_core(void) /* initially apply input style */ vb_update_input_style(); + setup_signals(); + + /* enter normal mode */ + mode_enter('n'); + /* make sure the main window and all its contents are visible */ gtk_widget_show_all(gui->window); } -- 2.20.1