To: vim_dev@googlegroups.com Subject: Patch 7.4.2193 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2193 Problem: With Gnome when the GUI can't start test_startup hangs. Solution: Call gui_mch_early_init_check(). (Hirohito Higashi) Files: src/gui.c, src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro *** ../vim-7.4.2192/src/gui.c 2016-07-24 22:25:11.217375024 +0200 --- src/gui.c 2016-08-10 21:21:19.627523479 +0200 *************** *** 447,453 **** * See gui_do_fork(). * Use a simpler check if the GUI window can probably be opened. */ ! result = gui.dofork ? gui_mch_early_init_check() : gui_mch_init_check(); # else result = gui_mch_init_check(); # endif --- 447,453 ---- * See gui_do_fork(). * Use a simpler check if the GUI window can probably be opened. */ ! result = gui.dofork ? gui_mch_early_init_check(TRUE) : gui_mch_init_check(); # else result = gui_mch_init_check(); # endif *** ../vim-7.4.2192/src/gui_gtk_x11.c 2016-07-21 22:10:06.051248382 +0200 --- src/gui_gtk_x11.c 2016-08-10 21:24:06.029937376 +0200 *************** *** 542,549 **** } /* These arguments make gnome_program_init() print a message and exit. ! * Must start the GUI for this, otherwise ":gui" will exit later! */ ! if (option->flags & ARG_NEEDS_GUI) gui.starting = TRUE; if (option->flags & ARG_KEEP) --- 542,551 ---- } /* These arguments make gnome_program_init() print a message and exit. ! * Must start the GUI for this, otherwise ":gui" will exit later! ! * Only when the GUI can start. */ ! if ((option->flags & ARG_NEEDS_GUI) ! && gui_mch_early_init_check(FALSE) == OK) gui.starting = TRUE; if (option->flags & ARG_KEEP) *************** *** 1663,1669 **** * Return OK or FAIL. */ int ! gui_mch_early_init_check(void) { char_u *p; --- 1665,1671 ---- * Return OK or FAIL. */ int ! gui_mch_early_init_check(int give_message) { char_u *p; *************** *** 1672,1678 **** if (p == NULL || *p == NUL) { gui.dying = TRUE; ! EMSG(_((char *)e_opendisp)); return FAIL; } return OK; --- 1674,1681 ---- if (p == NULL || *p == NUL) { gui.dying = TRUE; ! if (give_message) ! EMSG(_((char *)e_opendisp)); return FAIL; } return OK; *** ../vim-7.4.2192/src/proto/gui_gtk_x11.pro 2016-07-07 16:42:57.318788362 +0200 --- src/proto/gui_gtk_x11.pro 2016-08-10 21:24:16.913834191 +0200 *************** *** 6,12 **** void gui_mch_set_blinking(long waittime, long on, long off); void gui_mch_stop_blink(void); void gui_mch_start_blink(void); ! int gui_mch_early_init_check(void); int gui_mch_init_check(void); void gui_mch_show_tabline(int showit); int gui_mch_showing_tabline(void); --- 6,12 ---- void gui_mch_set_blinking(long waittime, long on, long off); void gui_mch_stop_blink(void); void gui_mch_start_blink(void); ! int gui_mch_early_init_check(int give_message); int gui_mch_init_check(void); void gui_mch_show_tabline(int showit); int gui_mch_showing_tabline(void); *** ../vim-7.4.2192/src/version.c 2016-08-10 20:53:01.683116135 +0200 --- src/version.c 2016-08-10 21:24:45.321564909 +0200 *************** *** 765,766 **** --- 765,768 ---- { /* Add new patch number below this line */ + /**/ + 2193, /**/ -- An operatingsystem is just a name you give to the rest of bloating idiosyncratic machine-based-features you left out of your editor. (author unknown) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///