changeset 18989:7abe2444d1e1 v8.2.0055

patch 8.2.0055: cannot use ":gui" in vimrc with VIMDLL enabled Commit: https://github.com/vim/vim/commit/257a396879ff67a0482841a39237f30a8e1e27c5 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 29 15:19:03 2019 +0100 patch 8.2.0055: cannot use ":gui" in vimrc with VIMDLL enabled Problem: Cannot use ":gui" in vimrc with VIMDLL enabled. Solution: Change the logic, check "gui.starting". (Ken Takata, closes https://github.com/vim/vim/issues/5408)
author Bram Moolenaar <Bram@vim.org>
date Sun, 29 Dec 2019 15:30:03 +0100
parents 6badd08088e1
children 1219ae40b086
files src/gui.c src/version.c
diffstat 2 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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))
--- a/src/version.c
+++ b/src/version.c
@@ -743,6 +743,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    55,
+/**/
     54,
 /**/
     53,