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:
Will Stamper 2014-06-13 22:08:04 -05:00 committed by Justin M. Keyes
parent fdeb132cad
commit 1cdd4ff7f6
2 changed files with 4 additions and 3 deletions

View File

@ -8989,13 +8989,14 @@ static void f_getchar(typval_T *argvars, typval_T *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;

View File

@ -212,7 +212,7 @@ static int included_patches[] = {
//309, //309,
//308, //308,
//307, //307,
//306, 306,
//305, //305,
//304, //304,
303, 303,