Skip to content

Commit 294d9bf

Browse files
committed
patch 8.1.1369: get E484 when using system() during GUI startup
Problem: Get E484 when using system() during GUI startup. Solution: Check "gui.starting". (Ken Takata)
1 parent e09244e commit 294d9bf

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/os_win32.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2762,7 +2762,7 @@ mch_init(void)
27622762
mch_exit(int r)
27632763
{
27642764
#ifdef VIMDLL
2765-
if (gui.starting || gui.in_use)
2765+
if (gui.in_use || gui.starting)
27662766
mch_exit_g(r);
27672767
else
27682768
mch_exit_c(r);
@@ -4500,7 +4500,7 @@ mch_system_c(char *cmd, int options)
45004500
mch_system(char *cmd, int options)
45014501
{
45024502
#ifdef VIMDLL
4503-
if (gui.in_use)
4503+
if (gui.in_use || gui.starting)
45044504
return mch_system_g(cmd, options);
45054505
else
45064506
return mch_system_c(cmd, options);
@@ -4821,7 +4821,7 @@ mch_call_shell(
48214821
{
48224822
cmdlen =
48234823
#ifdef FEAT_GUI_MSWIN
4824-
(gui.in_use ?
4824+
((gui.in_use || gui.starting) ?
48254825
(!s_dont_use_vimrun && p_stmp ?
48264826
STRLEN(vimrun_path) : STRLEN(p_sh) + STRLEN(p_shcf))
48274827
: 0) +
@@ -4834,7 +4834,7 @@ mch_call_shell(
48344834
#if defined(FEAT_GUI_MSWIN)
48354835
if (
48364836
# ifdef VIMDLL
4837-
gui.in_use &&
4837+
(gui.in_use || gui.starting) &&
48384838
# endif
48394839
need_vimrun_warning)
48404840
{
@@ -4853,7 +4853,7 @@ mch_call_shell(
48534853
}
48544854
if (
48554855
# ifdef VIMDLL
4856-
gui.in_use &&
4856+
(gui.in_use || gui.starting) &&
48574857
# endif
48584858
!s_dont_use_vimrun && p_stmp)
48594859
/* Use vimrun to execute the command. It opens a console
@@ -4865,7 +4865,7 @@ mch_call_shell(
48654865
p_sh, p_shcf, cmd);
48664866
else
48674867
# ifdef VIMDLL
4868-
if (gui.in_use)
4868+
if (gui.in_use || gui.starting)
48694869
# endif
48704870
vim_snprintf((char *)newcmd, cmdlen, "%s %s %s %s %s",
48714871
p_sh, p_shcf, p_sh, p_shcf, cmd);
@@ -4889,7 +4889,7 @@ mch_call_shell(
48894889
/* Print the return value, unless "vimrun" was used. */
48904890
if (x != 0 && !(options & SHELL_SILENT) && !emsg_silent
48914891
#if defined(FEAT_GUI_MSWIN)
4892-
&& (gui.in_use ?
4892+
&& ((gui.in_use || gui.starting) ?
48934893
((options & SHELL_DOOUT) || s_dont_use_vimrun || !p_stmp) : 1)
48944894
#endif
48954895
)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,8 @@ static char *(features[]) =
767767

768768
static int included_patches[] =
769769
{ /* Add new patch number below this line */
770+
/**/
771+
1369,
770772
/**/
771773
1368,
772774
/**/

0 commit comments

Comments
 (0)