mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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)
This commit is contained in:
@@ -2762,7 +2762,7 @@ mch_init(void)
|
|||||||
mch_exit(int r)
|
mch_exit(int r)
|
||||||
{
|
{
|
||||||
#ifdef VIMDLL
|
#ifdef VIMDLL
|
||||||
if (gui.starting || gui.in_use)
|
if (gui.in_use || gui.starting)
|
||||||
mch_exit_g(r);
|
mch_exit_g(r);
|
||||||
else
|
else
|
||||||
mch_exit_c(r);
|
mch_exit_c(r);
|
||||||
@@ -4500,7 +4500,7 @@ mch_system_c(char *cmd, int options)
|
|||||||
mch_system(char *cmd, int options)
|
mch_system(char *cmd, int options)
|
||||||
{
|
{
|
||||||
#ifdef VIMDLL
|
#ifdef VIMDLL
|
||||||
if (gui.in_use)
|
if (gui.in_use || gui.starting)
|
||||||
return mch_system_g(cmd, options);
|
return mch_system_g(cmd, options);
|
||||||
else
|
else
|
||||||
return mch_system_c(cmd, options);
|
return mch_system_c(cmd, options);
|
||||||
@@ -4821,7 +4821,7 @@ mch_call_shell(
|
|||||||
{
|
{
|
||||||
cmdlen =
|
cmdlen =
|
||||||
#ifdef FEAT_GUI_MSWIN
|
#ifdef FEAT_GUI_MSWIN
|
||||||
(gui.in_use ?
|
((gui.in_use || gui.starting) ?
|
||||||
(!s_dont_use_vimrun && p_stmp ?
|
(!s_dont_use_vimrun && p_stmp ?
|
||||||
STRLEN(vimrun_path) : STRLEN(p_sh) + STRLEN(p_shcf))
|
STRLEN(vimrun_path) : STRLEN(p_sh) + STRLEN(p_shcf))
|
||||||
: 0) +
|
: 0) +
|
||||||
@@ -4834,7 +4834,7 @@ mch_call_shell(
|
|||||||
#if defined(FEAT_GUI_MSWIN)
|
#if defined(FEAT_GUI_MSWIN)
|
||||||
if (
|
if (
|
||||||
# ifdef VIMDLL
|
# ifdef VIMDLL
|
||||||
gui.in_use &&
|
(gui.in_use || gui.starting) &&
|
||||||
# endif
|
# endif
|
||||||
need_vimrun_warning)
|
need_vimrun_warning)
|
||||||
{
|
{
|
||||||
@@ -4853,7 +4853,7 @@ mch_call_shell(
|
|||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
# ifdef VIMDLL
|
# ifdef VIMDLL
|
||||||
gui.in_use &&
|
(gui.in_use || gui.starting) &&
|
||||||
# endif
|
# endif
|
||||||
!s_dont_use_vimrun && p_stmp)
|
!s_dont_use_vimrun && p_stmp)
|
||||||
/* Use vimrun to execute the command. It opens a console
|
/* Use vimrun to execute the command. It opens a console
|
||||||
@@ -4865,7 +4865,7 @@ mch_call_shell(
|
|||||||
p_sh, p_shcf, cmd);
|
p_sh, p_shcf, cmd);
|
||||||
else
|
else
|
||||||
# ifdef VIMDLL
|
# ifdef VIMDLL
|
||||||
if (gui.in_use)
|
if (gui.in_use || gui.starting)
|
||||||
# endif
|
# endif
|
||||||
vim_snprintf((char *)newcmd, cmdlen, "%s %s %s %s %s",
|
vim_snprintf((char *)newcmd, cmdlen, "%s %s %s %s %s",
|
||||||
p_sh, p_shcf, p_sh, p_shcf, cmd);
|
p_sh, p_shcf, p_sh, p_shcf, cmd);
|
||||||
@@ -4889,7 +4889,7 @@ mch_call_shell(
|
|||||||
/* Print the return value, unless "vimrun" was used. */
|
/* Print the return value, unless "vimrun" was used. */
|
||||||
if (x != 0 && !(options & SHELL_SILENT) && !emsg_silent
|
if (x != 0 && !(options & SHELL_SILENT) && !emsg_silent
|
||||||
#if defined(FEAT_GUI_MSWIN)
|
#if defined(FEAT_GUI_MSWIN)
|
||||||
&& (gui.in_use ?
|
&& ((gui.in_use || gui.starting) ?
|
||||||
((options & SHELL_DOOUT) || s_dont_use_vimrun || !p_stmp) : 1)
|
((options & SHELL_DOOUT) || s_dont_use_vimrun || !p_stmp) : 1)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
|
@@ -767,6 +767,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1369,
|
||||||
/**/
|
/**/
|
||||||
1368,
|
1368,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user