]> granicus.if.org Git - vim/commitdiff
patch 8.2.0055: cannot use ":gui" in vimrc with VIMDLL enabled v8.2.0055
authorBram Moolenaar <Bram@vim.org>
Sun, 29 Dec 2019 14:19:03 +0000 (15:19 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 29 Dec 2019 14:19:03 +0000 (15:19 +0100)
Problem:    Cannot use ":gui" in vimrc with VIMDLL enabled.
Solution:   Change the logic, check "gui.starting". (Ken Takata, closes #5408)

src/gui.c
src/version.c

index 7b59300586e88c0efbb84bffdb5916c713758f22..1249fab22096156e75cf679ed14de72a1f409264 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -5010,21 +5010,23 @@ ex_gui(exarg_T *eap)
     if (!gui.in_use)
     {
 #if defined(VIMDLL) && !defined(EXPERIMENTAL_GUI_CMD)
-       emsg(_(e_nogvim));
-       return;
-#else
+       if (!gui.starting)
+       {
+           emsg(_(e_nogvim));
+           return;
+       }
+#endif
        // Clear the command.  Needed for when forking+exiting, to avoid part
        // of the argument ending up after the shell prompt.
        msg_clr_eos_force();
-# ifdef GUI_MAY_SPAWN
+#ifdef GUI_MAY_SPAWN
        if (!ends_excmd(*eap->arg))
            gui_start(eap->arg);
        else
-# endif
+#endif
            gui_start(NULL);
-# ifdef FEAT_JOB_CHANNEL
+#ifdef FEAT_JOB_CHANNEL
        channel_gui_register_all();
-# endif
 #endif
     }
     if (!ends_excmd(*eap->arg))
index a099cd3ec7777de47109d67510038350b77f85dd..98a9ca4a13663440c99be62b8486bac90951c676 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    55,
 /**/
     54,
 /**/