mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
updated for version 7.4.306
Problem: getchar(0) does not return Esc. Solution: Do not wait for an Esc sequence to be complete. (Yasuhiro Matsumoto)
This commit is contained in:
@@ -11313,13 +11313,14 @@ f_getchar(argvars, rettv)
|
|||||||
n = safe_vgetc();
|
n = safe_vgetc();
|
||||||
else if (get_tv_number_chk(&argvars[0], &error) == 1)
|
else if (get_tv_number_chk(&argvars[0], &error) == 1)
|
||||||
/* getchar(1): only check if char avail */
|
/* getchar(1): only check if char avail */
|
||||||
n = vpeekc();
|
n = vpeekc_any();
|
||||||
else if (error || vpeekc() == NUL)
|
else if (error || vpeekc_any() == NUL)
|
||||||
/* 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: return char */
|
||||||
n = safe_vgetc();
|
n = safe_vgetc();
|
||||||
|
|
||||||
if (n == K_IGNORE)
|
if (n == K_IGNORE)
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
|
@@ -1883,7 +1883,7 @@ vpeekc_nomap()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(FEAT_INS_EXPAND) || defined(PROTO)
|
#if defined(FEAT_INS_EXPAND) || defined(FEAT_EVAL) || defined(PROTO)
|
||||||
/*
|
/*
|
||||||
* Check if any character is available, also half an escape sequence.
|
* Check if any character is available, also half an escape sequence.
|
||||||
* Trick: when no typeahead found, but there is something in the typeahead
|
* Trick: when no typeahead found, but there is something in the typeahead
|
||||||
|
@@ -734,6 +734,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 */
|
||||||
|
/**/
|
||||||
|
306,
|
||||||
/**/
|
/**/
|
||||||
305,
|
305,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user