diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-05-22 18:59:58 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-05-22 18:59:58 +0200 |
commit | 9a665ba296bfe0e96d9f72d9f50b956e210e50c2 (patch) | |
tree | 258226bfe2c59d3d7b7a6dad241cb3fc78f1b75c /src/eval.c | |
parent | 13600303c539816933e8b74d14cc518b00f250f8 (diff) | |
download | vim-git-9a665ba296bfe0e96d9f72d9f50b956e210e50c2.tar.gz |
updated for version 7.4.306v7.4.306
Problem: getchar(0) does not return Esc.
Solution: Do not wait for an Esc sequence to be complete. (Yasuhiro
Matsumoto)
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c index bc7f22ad7..3d3c8b4c7 100644 --- a/src/eval.c +++ b/src/eval.c @@ -11313,13 +11313,14 @@ f_getchar(argvars, 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; |