diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-05-16 23:15:08 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-05-16 23:15:08 +0200 |
commit | 3b1f18f785f67c6cd110498c366e4d0c0fe11f27 (patch) | |
tree | da0f950520c6e802bae80dda08a517b402a358da /src/os_unix.c | |
parent | df671b4629a0c6451c067cafd2534b7261f41277 (diff) | |
download | vim-git-3b1f18f785f67c6cd110498c366e4d0c0fe11f27.tar.gz |
patch 8.2.0773: switching to raw mode every time ":" is usedv8.2.0773
Problem: Switching to raw mode every time ":" is used.
Solution: When executing a shell set cur_tmode to TMODE_UNKNOWN, so that the
next time TMODE_RAW is used it is set, but not every time.
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index aea3d5a9e..9162f5bf8 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -4521,7 +4521,11 @@ mch_call_shell_system( } if (tmode == TMODE_RAW) + { + // The shell may have messed with the mode, always set it. + cur_tmode = TMODE_UNKNOWN; settmode(TMODE_RAW); // set to raw mode + } # ifdef FEAT_TITLE resettitle(); # endif @@ -4571,6 +4575,9 @@ mch_call_shell_fork( out_flush(); if (options & SHELL_COOKED) settmode(TMODE_COOK); // set to normal mode + if (tmode == TMODE_RAW) + // The shell may have messed with the mode, always set it later. + cur_tmode = TMODE_UNKNOWN; if (unix_build_argv(cmd, &argv, &tofree1, &tofree2) == FAIL) goto error; |