From: Daniel Carl Date: Sat, 9 Nov 2013 00:39:03 +0000 (+0100) Subject: Setup the signal handlers as late as possible. X-Git-Url: https://git.owens.tech/projects.html/projects.html/git?a=commitdiff_plain;h=a4ea559b4209e60502616f3b8a3b698bfe959b93;p=vimb.git Setup the signal handlers as late as possible. --- 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); }