# HG changeset patch # User Bram Moolenaar # Date 1610028005 -3600 # Node ID 049b1e867137d85c39aba2d88b7b1afff623150b # Parent 6feb235b804d547949d011cf4b5f59e220ab71ae patch 8.2.2307: a shell command in the vimrc causes terminal output Commit: https://github.com/vim/vim/commit/ebbf11c1198b7aec8a1a55f7231ecb4f1a432fa0 Author: Bram Moolenaar Date: Thu Jan 7 14:45:03 2021 +0100 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 --- 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() /* diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2307, +/**/ 2306, /**/ 2305,