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.
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index c61810f..24763d9 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1360,8 +1360,8 @@
#endif
#ifdef MSWIN
int winstart = FALSE;
- int keep_termcap = FALSE;
#endif
+ int keep_termcap = !termcap_active;
/*
* Disallow shell commands for "rvim".
@@ -1395,9 +1395,7 @@
msg_putchar('\r'); // put cursor at start of line
if (!autocmd_busy)
{
-#ifdef MSWIN
if (!keep_termcap)
-#endif
stoptermcap();
}
#ifdef MSWIN
@@ -1488,9 +1486,7 @@
}
#endif // FEAT_GUI_MSWIN
-#ifdef MSWIN
if (!keep_termcap) // if keep_termcap is TRUE didn't stop termcap
-#endif
starttermcap(); // start termcap if not done by wait_return()
/*