Mercurial > vim
comparison src/gui.c @ 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 | 5c405689da3e |
children | 94eda51ba9ba |
comparison
equal
deleted
inserted
replaced
18988:6badd08088e1 | 18989:7abe2444d1e1 |
---|---|
5008 eap->arg = skipwhite(eap->arg + 2); | 5008 eap->arg = skipwhite(eap->arg + 2); |
5009 } | 5009 } |
5010 if (!gui.in_use) | 5010 if (!gui.in_use) |
5011 { | 5011 { |
5012 #if defined(VIMDLL) && !defined(EXPERIMENTAL_GUI_CMD) | 5012 #if defined(VIMDLL) && !defined(EXPERIMENTAL_GUI_CMD) |
5013 emsg(_(e_nogvim)); | 5013 if (!gui.starting) |
5014 return; | 5014 { |
5015 #else | 5015 emsg(_(e_nogvim)); |
5016 return; | |
5017 } | |
5018 #endif | |
5016 // Clear the command. Needed for when forking+exiting, to avoid part | 5019 // Clear the command. Needed for when forking+exiting, to avoid part |
5017 // of the argument ending up after the shell prompt. | 5020 // of the argument ending up after the shell prompt. |
5018 msg_clr_eos_force(); | 5021 msg_clr_eos_force(); |
5019 # ifdef GUI_MAY_SPAWN | 5022 #ifdef GUI_MAY_SPAWN |
5020 if (!ends_excmd(*eap->arg)) | 5023 if (!ends_excmd(*eap->arg)) |
5021 gui_start(eap->arg); | 5024 gui_start(eap->arg); |
5022 else | 5025 else |
5023 # endif | 5026 #endif |
5024 gui_start(NULL); | 5027 gui_start(NULL); |
5025 # ifdef FEAT_JOB_CHANNEL | 5028 #ifdef FEAT_JOB_CHANNEL |
5026 channel_gui_register_all(); | 5029 channel_gui_register_all(); |
5027 # endif | |
5028 #endif | 5030 #endif |
5029 } | 5031 } |
5030 if (!ends_excmd(*eap->arg)) | 5032 if (!ends_excmd(*eap->arg)) |
5031 ex_next(eap); | 5033 ex_next(eap); |
5032 } | 5034 } |