]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.2307: a shell command in the vimrc causes terminal output v8.2.2307
authorBram Moolenaar <Bram@vim.org>
Thu, 7 Jan 2021 13:45:03 +0000 (14:45 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 7 Jan 2021 13:45:03 +0000 (14:45 +0100)
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.

src/ex_cmds.c
src/version.c

index c61810fe6c6948dc377d0f7a99015b0f1990f44f..24763d94d30852fc2979311ee6577d6fc7060ff8 100644 (file)
@@ -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()
 
        /*
index 1945a4a30b175d343b631e64d1d652c5cd394a08..3f8ed2a4191fc18057d0c7640c2502e0c0cb104c 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2307,
 /**/
     2306,
 /**/