From b77cad183ddcb7d0f312a3cf022238c43932a07b Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 4 Feb 2017 18:54:55 +0100 Subject: vim-patch:8.0.0275 Problem: When checking for CTRL-C typed the GUI may detect a screen resize and redraw the screen, causing trouble. Solution: Set updating_screen in ui_breakcheck(). https://github.com/vim/vim/commit/e3caa1109072b9655f8d5103c92efd73177f8577 --- src/nvim/os/input.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/nvim/os/input.c') diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c index f264a26939..5f0f2ec677 100644 --- a/src/nvim/os/input.c +++ b/src/nvim/os/input.c @@ -144,9 +144,15 @@ bool os_char_avail(void) // Check for CTRL-C typed by reading all available characters. void os_breakcheck(void) { + int save_us = updating_screen; + // We do not want screen_resize() to redraw here. + updating_screen++; + if (!got_int) { loop_poll_events(&main_loop, 0); } + + updating_screen = save_us; } void input_enable_events(void) -- cgit