mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.306 #842
Problem: getchar(0) does not return Esc. Solution: Do not wait for an Esc sequence to be complete. (Yasuhiro Matsumoto) https://code.google.com/p/vim/source/detail?r=05e1d8afcc5e375bf708ccc9810e2fd1a5a8a3cf
This commit is contained in:
parent
fdeb132cad
commit
1cdd4ff7f6
@ -8989,13 +8989,14 @@ static void f_getchar(typval_T *argvars, typval_T *rettv)
|
||||
n = safe_vgetc();
|
||||
else if (get_tv_number_chk(&argvars[0], &error) == 1)
|
||||
/* getchar(1): only check if char avail */
|
||||
n = vpeekc();
|
||||
else if (error || vpeekc() == NUL)
|
||||
n = vpeekc_any();
|
||||
else if (error || vpeekc_any() == NUL)
|
||||
/* illegal argument or getchar(0) and no char avail: return zero */
|
||||
n = 0;
|
||||
else
|
||||
/* getchar(0) and char avail: return char */
|
||||
n = safe_vgetc();
|
||||
|
||||
if (n == K_IGNORE)
|
||||
continue;
|
||||
break;
|
||||
|
@ -212,7 +212,7 @@ static int included_patches[] = {
|
||||
//309,
|
||||
//308,
|
||||
//307,
|
||||
//306,
|
||||
306,
|
||||
//305,
|
||||
//304,
|
||||
303,
|
||||
|
Loading…
Reference in New Issue
Block a user