From c01300361c7db148ea4c3971877c7dba5e4ba7f3 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sun, 17 Mar 2019 10:28:06 +0000 Subject: vi: improve reliability of pasted text Increase the allowed number of outstanding events in the input queue to two. --- editors/vi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'editors/vi.c') diff --git a/editors/vi.c b/editors/vi.c index 15ebe8dae..d5d7dfffc 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -2817,13 +2817,13 @@ static int mysleep(int hund) // sleep for 'hund' 1/100 seconds or stdin ready DWORD ret; if (hund == 0) { - /* Allow one event in the queue. Otherwise pasted test isn't + /* Allow two events in the queue. Otherwise pasted test isn't * displayed because there's still a key release event waiting * after the last character is processed. */ DWORD nevent_out; ret = GetNumberOfConsoleInputEvents(h, &nevent_out); - return ret != 0 ? (nevent_out > 1) : 0; + return ret != 0 ? (nevent_out > 2) : 0; } fflush_all(); ret = WaitForSingleObject(h, hund*10); -- cgit v1.2.3-55-g6feb