updated for version 7.3.1309 v7.3.1309
authorBram Moolenaar <Bram@vim.org>
Fri, 5 Jul 2013 16:29:48 +0000 (18:29 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 5 Jul 2013 16:29:48 +0000 (18:29 +0200)
Problem:    When a script defines a function the flag to wait for the user to
            hit enter is reset.
Solution:   Restore the flag. (Yasuhiro Matsumoto)  Except when the user was
            typing the function.

src/eval.c
src/os_unix.c
src/version.c

index 2a2817e6d23cd15751b88e46e9c5c1f736e5b048..b9d739da01b656a2fef270c32e0ef283a5f7fca2 100644 (file)
@@ -21108,6 +21108,7 @@ ex_function(eap)
     int                j;
     int                c;
     int                saved_did_emsg;
+    int                saved_wait_return = need_wait_return;
     char_u     *name = NULL;
     char_u     *p;
     char_u     *arg;
@@ -21439,7 +21440,10 @@ ex_function(eap)
     for (;;)
     {
        if (KeyTyped)
+       {
            msg_scroll = TRUE;
+           saved_wait_return = FALSE;
+       }
        need_wait_return = FALSE;
        sourcing_lnum_off = sourcing_lnum;
 
@@ -21750,6 +21754,7 @@ ret_free:
     vim_free(fudi.fd_newkey);
     vim_free(name);
     did_emsg |= saved_did_emsg;
+    need_wait_return |= saved_wait_return;
 }
 
 /*
index 2223faf77d1c6c20073696435c361ce2a7c4a991..37cc3a7dd2968bad3afbd5ac0d00c5efaaa32470 100644 (file)
@@ -6129,7 +6129,6 @@ save_patterns(num_pat, pat, num_file, file)
 }
 #endif
 
-
 /*
  * Return TRUE if the string "p" contains a wildcard that mch_expandpath() can
  * expand.
index 5a200ae8fb3ca868606e569311db5761fe8cf79c..a8d7def79859bf4b950993d025f8379551253625 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1309,
 /**/
     1308,
 /**/