mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.2.2307: a shell command in the vimrc causes terminal output
Problem: A shell command in the vimrc causes terminal output. Solution: Do not call starttermcap() after a shell command if the termcap wasn't active before.
This commit is contained in:
@@ -1360,8 +1360,8 @@ do_shell(
|
|||||||
#endif
|
#endif
|
||||||
#ifdef MSWIN
|
#ifdef MSWIN
|
||||||
int winstart = FALSE;
|
int winstart = FALSE;
|
||||||
int keep_termcap = FALSE;
|
|
||||||
#endif
|
#endif
|
||||||
|
int keep_termcap = !termcap_active;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Disallow shell commands for "rvim".
|
* Disallow shell commands for "rvim".
|
||||||
@@ -1395,9 +1395,7 @@ do_shell(
|
|||||||
msg_putchar('\r'); // put cursor at start of line
|
msg_putchar('\r'); // put cursor at start of line
|
||||||
if (!autocmd_busy)
|
if (!autocmd_busy)
|
||||||
{
|
{
|
||||||
#ifdef MSWIN
|
|
||||||
if (!keep_termcap)
|
if (!keep_termcap)
|
||||||
#endif
|
|
||||||
stoptermcap();
|
stoptermcap();
|
||||||
}
|
}
|
||||||
#ifdef MSWIN
|
#ifdef MSWIN
|
||||||
@@ -1488,9 +1486,7 @@ do_shell(
|
|||||||
}
|
}
|
||||||
#endif // FEAT_GUI_MSWIN
|
#endif // FEAT_GUI_MSWIN
|
||||||
|
|
||||||
#ifdef MSWIN
|
|
||||||
if (!keep_termcap) // if keep_termcap is TRUE didn't stop termcap
|
if (!keep_termcap) // if keep_termcap is TRUE didn't stop termcap
|
||||||
#endif
|
|
||||||
starttermcap(); // start termcap if not done by wait_return()
|
starttermcap(); // start termcap if not done by wait_return()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -750,6 +750,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 */
|
||||||
|
/**/
|
||||||
|
2307,
|
||||||
/**/
|
/**/
|
||||||
2306,
|
2306,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user