diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-28 22:32:58 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-28 22:32:58 +0100 |
commit | 12dfc9eef14fe74c46145aa9e6cba9666f1bcd40 (patch) | |
tree | 3a3c98030644028f710d33d7c2b2558ac0f2db13 /src/gui_w32.c | |
parent | f58d81a18752cb9bf899b3f7328fc489cf6558e8 (diff) | |
download | vim-git-12dfc9eef14fe74c46145aa9e6cba9666f1bcd40.tar.gz |
patch 8.1.0840: getchar(0) never returns a character in the terminalv8.1.0840
Problem: getchar(0) never returns a character in the terminal.
Solution: Call wait_func() at least once.
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r-- | src/gui_w32.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c index c5e58790d..ead617a79 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -2097,12 +2097,14 @@ gui_mch_wait_for_chars(int wtime) s_timed_out = FALSE; - if (wtime > 0) + if (wtime >= 0) { - /* Don't do anything while processing a (scroll) message. */ + // Don't do anything while processing a (scroll) message. if (s_busy_processing) return FAIL; - s_wait_timer = (UINT)SetTimer(NULL, 0, (UINT)wtime, + + // When called with "wtime" zero, just want one msec. + s_wait_timer = (UINT)SetTimer(NULL, 0, (UINT)(wtime == 0 ? 1 : wtime), (TIMERPROC)_OnTimer); } |