diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-10 21:28:44 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-10 21:28:44 +0200 |
commit | 717e196060d946fe20bb0f0307f417dc4d0e9b17 (patch) | |
tree | bd393aae467478792beb337a9b333e02436981a5 /src/gui_gtk_x11.c | |
parent | a6b7a08ae04a3cd4d9c45c906bb7a197e2135179 (diff) | |
download | vim-git-717e196060d946fe20bb0f0307f417dc4d0e9b17.tar.gz |
patch 7.4.2193v7.4.2193
Problem: With Gnome when the GUI can't start test_startup hangs.
Solution: Call gui_mch_early_init_check(). (Hirohito Higashi)
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r-- | src/gui_gtk_x11.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index 939ecde7e..7c63a49fc 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -542,8 +542,10 @@ gui_mch_prepare(int *argc, char **argv) } /* 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) + * 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,7 +1665,7 @@ selection_get_cb(GtkWidget *widget UNUSED, * Return OK or FAIL. */ int -gui_mch_early_init_check(void) +gui_mch_early_init_check(int give_message) { char_u *p; @@ -1672,7 +1674,8 @@ gui_mch_early_init_check(void) if (p == NULL || *p == NUL) { gui.dying = TRUE; - EMSG(_((char *)e_opendisp)); + if (give_message) + EMSG(_((char *)e_opendisp)); return FAIL; } return OK; |