summaryrefslogtreecommitdiffstats
path: root/src/getchar.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-28 22:32:28 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-28 22:32:28 +0000
commitc1b5286315db24e25b05f9ac8d19f11e11793a8f (patch)
treee7456863ab65a4b65059742ff2f95e2682181c0d /src/getchar.c
parent437df8f48460ad687c6f4cc5dd4c9b66155c7b05 (diff)
updated for version 7.0f04
Diffstat (limited to 'src/getchar.c')
-rw-r--r--src/getchar.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/getchar.c b/src/getchar.c
index 629ad770be..7b1cf875cb 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -2321,7 +2321,8 @@ vgetorpeek(advance)
/*
* Handle ":map <expr>": evaluate the {rhs} as an
* expression. Save and restore the typeahead so that
- * getchar() can be used.
+ * getchar() can be used. Also save and restore the
+ * command line for "normal :".
*/
if (mp->m_expr)
{
@@ -4301,8 +4302,13 @@ eval_map_expr(str)
{
char_u *res;
char_u *p;
+ char_u *save_cmd;
+ save_cmd = save_cmdline_alloc();
+ if (save_cmd == NULL)
+ return NULL;
p = eval_to_string(str, NULL, FALSE);
+ restore_cmdline_alloc(save_cmd);
if (p == NULL)
return NULL;
res = vim_strsave_escape_csi(p);