0
0
mirror of https://github.com/vim/vim.git synced 2025-07-25 10:54:51 -04:00

patch 8.2.2076: MS-Windows console: sometimes drops typed characters

Problem:    MS-Windows console: sometimes drops typed characters.
Solution:   Do not wait longer than 10 msec for input. (issue #7164)
This commit is contained in:
Bram Moolenaar 2020-12-01 21:27:51 +01:00
parent 57cf4973a2
commit c478ee3d83
2 changed files with 9 additions and 19 deletions

View File

@ -1588,26 +1588,14 @@ WaitForChar(long msec, int ignore_input)
{ {
DWORD dwWaitTime = dwEndTime - dwNow; DWORD dwWaitTime = dwEndTime - dwNow;
# ifdef FEAT_JOB_CHANNEL // Don't wait for more than 11 msec to avoid dropping characters,
// Check channel while waiting for input. // check channel while waiting for input and handle a callback from
if (dwWaitTime > 100) // 'balloonexpr'.
{ if (dwWaitTime > 11)
dwWaitTime = 100; dwWaitTime = 11;
// If there is readahead then parse_queued_messages() timed out
// and we should call it again soon.
if (channel_any_readahead())
dwWaitTime = 10;
}
# endif
# ifdef FEAT_BEVAL_GUI
if (p_beval && dwWaitTime > 100)
// The 'balloonexpr' may indirectly invoke a callback while
// waiting for a character, need to check often.
dwWaitTime = 100;
# endif
# ifdef FEAT_MZSCHEME # ifdef FEAT_MZSCHEME
if (mzthreads_allowed() && p_mzq > 0 if (mzthreads_allowed() && p_mzq > 0 && (long)dwWaitTime > p_mzq)
&& (msec < 0 || (long)dwWaitTime > p_mzq))
dwWaitTime = p_mzq; // don't wait longer than 'mzquantum' dwWaitTime = p_mzq; // don't wait longer than 'mzquantum'
# endif # endif
# ifdef FEAT_TIMERS # ifdef FEAT_TIMERS

View File

@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2076,
/**/ /**/
2075, 2075,
/**/ /**/