]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.338 v7.3.338
authorBram Moolenaar <Bram@vim.org>
Wed, 12 Oct 2011 20:02:14 +0000 (22:02 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 12 Oct 2011 20:02:14 +0000 (22:02 +0200)
Problem:    Using getchar() in an expression mapping doesn't work well.
Solution:   Don't save and restore the typeahead. (James Vega)

src/getchar.c
src/testdir/test34.ok
src/version.c

index 16bf65a0b94ca754bb4c878a7dd838aeca7d6906..a895483a4aa97970cc08b02edb9c252aff2f4928 100644 (file)
@@ -2460,27 +2460,18 @@ vgetorpeek(advance)
 
                        /*
                         * Handle ":map <expr>": evaluate the {rhs} as an
-                        * expression.  Save and restore the typeahead so that
-                        * getchar() can be used.  Also save and restore the
-                        * command line for "normal :".
+                        * expression.  Also save and restore the command line
+                        * for "normal :".
                         */
                        if (mp->m_expr)
                        {
-                           tasave_T    tabuf;
                            int         save_vgetc_busy = vgetc_busy;
 
-                           save_typeahead(&tabuf);
-                           if (tabuf.typebuf_valid)
-                           {
-                               vgetc_busy = 0;
-                               save_m_keys = vim_strsave(mp->m_keys);
-                               save_m_str = vim_strsave(mp->m_str);
-                               s = eval_map_expr(save_m_str, NUL);
-                               vgetc_busy = save_vgetc_busy;
-                           }
-                           else
-                               s = NULL;
-                           restore_typeahead(&tabuf);
+                           vgetc_busy = 0;
+                           save_m_keys = vim_strsave(mp->m_keys);
+                           save_m_str = vim_strsave(mp->m_str);
+                           s = eval_map_expr(save_m_str, NUL);
+                           vgetc_busy = save_vgetc_busy;
                        }
                        else
 #endif
index 951dd8bc69ea839782810b55365fa6150c2c941b..d71183dce96a9026ad0d20e54d4eec3f09700931 100644 (file)
@@ -1,5 +1,5 @@
 xxx4asdf fail nop ok 9 333
-XX111XX
+XX111-XX
 ---222---
 1. one
 2. two
index a77a78d88dea367f408725910165581d91e63d89..01bc41b4524d32f43de1b6b2ff1177b19a8f72e5 100644 (file)
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    338,
 /**/
     337,
 /**/