]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.306 v7.4.306
authorBram Moolenaar <Bram@vim.org>
Thu, 22 May 2014 16:59:58 +0000 (18:59 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 22 May 2014 16:59:58 +0000 (18:59 +0200)
Problem:    getchar(0) does not return Esc.
Solution:   Do not wait for an Esc sequence to be complete.  (Yasuhiro
            Matsumoto)

src/eval.c
src/getchar.c
src/version.c

index bc7f22ad71809525362fd0ce5952d619df5b0863..3d3c8b4c7f9a7c37a7f558a0dfa48d7ede85557b 100644 (file)
@@ -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;
index b39e64d97a1ea064a0dcfee3479b1bb2217359c4..c4ffb4b1635354723d343d0c4357992840716948 100644 (file)
@@ -1883,7 +1883,7 @@ vpeekc_nomap()
 }
 #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.
  * Trick: when no typeahead found, but there is something in the typeahead
index fcf412796327d20c39f6aa1acfb9746e45d7506d..de58cbd7d9bb06f6c0f5b9a3bf8143bf590dc1cb 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    306,
 /**/
     305,
 /**/