mirror of
https://github.com/vim/vim.git
synced 2025-10-04 05:25:06 -04:00
patch 8.1.0840: getchar(0) never returns a character in the terminal
Problem: getchar(0) never returns a character in the terminal. Solution: Call wait_func() at least once.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user