From 68ea9a7c8a7a74ec6ec9782528527cf70b92a376 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 19 Aug 2019 00:18:41 +0200 Subject: TUI/paste: always flush on paste mode-change Flush input before entering, not only when leaving, paste mode. Else there could be pending input which will erroneously be sent to the paste handler. --- src/nvim/tui/input.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/nvim/tui') diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c index dc79a22862..b16f93ae66 100644 --- a/src/nvim/tui/input.c +++ b/src/nvim/tui/input.c @@ -16,8 +16,6 @@ #include "nvim/os/input.h" #include "nvim/event/rstream.h" -#define PASTE_KEY "" -#define PASTEPOST_KEY "" #define KEY_BUFFER_SIZE 0xfff #ifdef INCLUDE_GENERATED_DECLARATIONS @@ -401,9 +399,7 @@ static bool handle_bracketed_paste(TermInput *input) return true; } - if (!enable) { - tinput_flush(input, true); - } + tinput_flush(input, true); input->paste_enabled = enable; return true; } -- cgit