Mercurial > vim
diff src/normal.c @ 30471:584231b9b37e v9.0.0571
patch 9.0.0571: MS-Windows: CTRL-C can make Vim exit
Commit: https://github.com/vim/vim/commit/f7e7302acb20b6ef6caa0740da1450b677ac91fb
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 24 13:10:04 2022 +0100
patch 9.0.0571: MS-Windows: CTRL-C can make Vim exit
Problem: MS-Windows: CTRL-C can make Vim exit.
Solution: Check the not-a-term argument.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 24 Sep 2022 14:15:04 +0200 |
parents | 072c61082148 |
children | eb86a6330ae3 |
line wrap: on
line diff
--- a/src/normal.c +++ b/src/normal.c @@ -6793,11 +6793,8 @@ nv_esc(cmdarg_T *cap) && !VIsual_active && no_reason) { - int out_redir = !stdout_isatty -#ifdef FEAT_GUI - && !gui.in_use -#endif - ; + int out_redir = !stdout_isatty && !is_not_a_term_or_gui(); + // The user may accidentally do "vim file | grep word" and then // CTRL-C doesn't show anything. With a changed buffer give the // message on stderr. Without any changes might as well exit.