diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-12-29 15:19:03 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-12-29 15:19:03 +0100 |
commit | 257a396879ff67a0482841a39237f30a8e1e27c5 (patch) | |
tree | 398dd1790cb26630dd05712f787b2ba845a72638 /src/gui.c | |
parent | ae7dba896975051a3f0b7123faa08dac5635972d (diff) | |
download | vim-git-257a396879ff67a0482841a39237f30a8e1e27c5.tar.gz |
patch 8.2.0055: cannot use ":gui" in vimrc with VIMDLL enabledv8.2.0055
Problem: Cannot use ":gui" in vimrc with VIMDLL enabled.
Solution: Change the logic, check "gui.starting". (Ken Takata, closes #5408)
Diffstat (limited to 'src/gui.c')
-rw-r--r-- | src/gui.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -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)) |