mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.1608: Vim9: getchar() test fails with GUI
Problem: Vim9: getchar() test fails with GUI. Solution: Avoid that getchar(0) gets stuck on K_IGNORE.
This commit is contained in:
parent
636c5d5399
commit
15183b41c4
@ -2044,10 +2044,12 @@ f_getchar(typval_T *argvars, typval_T *rettv)
|
|||||||
// illegal argument or getchar(0) and no char avail: return zero
|
// illegal argument or getchar(0) and no char avail: return zero
|
||||||
n = 0;
|
n = 0;
|
||||||
else
|
else
|
||||||
// getchar(0) and char avail: return char
|
// getchar(0) and char avail() != NUL: get a character.
|
||||||
n = plain_vgetc();
|
// Note that vpeekc_any() returns K_SPECIAL for K_IGNORE.
|
||||||
|
n = safe_vgetc();
|
||||||
|
|
||||||
if (n == K_IGNORE || n == K_MOUSEMOVE)
|
if (n == K_IGNORE || n == K_MOUSEMOVE
|
||||||
|
|| n == K_VER_SCROLLBAR || n == K_HOR_SCROLLBAR)
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -754,6 +754,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 */
|
||||||
|
/**/
|
||||||
|
1608,
|
||||||
/**/
|
/**/
|
||||||
1607,
|
1607,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user