diff options
author | Ron Yorston <rmy@pobox.com> | 2019-03-17 10:28:06 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-03-17 10:28:06 +0000 |
commit | c01300361c7db148ea4c3971877c7dba5e4ba7f3 (patch) | |
tree | cda241c8d7d898f335e5e023a225fe4a420618f1 | |
parent | 829afbd150936f188a9488e7ba8180db95a2be87 (diff) | |
download | busybox-w32-c01300361c7db148ea4c3971877c7dba5e4ba7f3.tar.gz busybox-w32-c01300361c7db148ea4c3971877c7dba5e4ba7f3.tar.bz2 busybox-w32-c01300361c7db148ea4c3971877c7dba5e4ba7f3.zip |
vi: improve reliability of pasted text
Increase the allowed number of outstanding events in the input
queue to two.
-rw-r--r-- | editors/vi.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 | |||
2817 | DWORD ret; | 2817 | DWORD ret; |
2818 | 2818 | ||
2819 | if (hund == 0) { | 2819 | if (hund == 0) { |
2820 | /* Allow one event in the queue. Otherwise pasted test isn't | 2820 | /* Allow two events in the queue. Otherwise pasted test isn't |
2821 | * displayed because there's still a key release event waiting | 2821 | * displayed because there's still a key release event waiting |
2822 | * after the last character is processed. */ | 2822 | * after the last character is processed. */ |
2823 | DWORD nevent_out; | 2823 | DWORD nevent_out; |
2824 | 2824 | ||
2825 | ret = GetNumberOfConsoleInputEvents(h, &nevent_out); | 2825 | ret = GetNumberOfConsoleInputEvents(h, &nevent_out); |
2826 | return ret != 0 ? (nevent_out > 1) : 0; | 2826 | return ret != 0 ? (nevent_out > 2) : 0; |
2827 | } | 2827 | } |
2828 | fflush_all(); | 2828 | fflush_all(); |
2829 | ret = WaitForSingleObject(h, hund*10); | 2829 | ret = WaitForSingleObject(h, hund*10); |