summaryrefslogtreecommitdiff
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-01-07 14:45:03 +0100
committerBram Moolenaar <Bram@vim.org>2021-01-07 14:45:03 +0100
commitebbf11c1198b7aec8a1a55f7231ecb4f1a432fa0 (patch)
tree0a5a4951496487a9c4d653b05bbb049acf7979c7 /src/ex_cmds.c
parent32b3f820107139d7edf0c592bb06f090c3eb6c51 (diff)
downloadvim-git-ebbf11c1198b7aec8a1a55f7231ecb4f1a432fa0.tar.gz
patch 8.2.2307: a shell command in the vimrc causes terminal outputv8.2.2307
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.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index c61810fe6..24763d94d 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1360,8 +1360,8 @@ do_shell(
#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 @@ do_shell(
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 @@ do_shell(
}
#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()
/*