0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.0g

This commit is contained in:
Bram Moolenaar
2006-04-30 18:54:39 +00:00
parent aa35dd1667
commit c9b4b05b35
282 changed files with 3456 additions and 3060 deletions

View File

@@ -4335,11 +4335,26 @@ eval_map_expr(str)
char_u *res;
char_u *p;
char_u *save_cmd;
pos_T save_cursor;
save_cmd = save_cmdline_alloc();
if (save_cmd == NULL)
return NULL;
/* Forbid changing text or using ":normal" to avoid most of the bad side
* effects. Also restore the cursor position. */
++textlock;
#ifdef FEAT_EX_EXTRA
++ex_normal_lock;
#endif
save_cursor = curwin->w_cursor;
p = eval_to_string(str, NULL, FALSE);
--textlock;
#ifdef FEAT_EX_EXTRA
--ex_normal_lock;
#endif
curwin->w_cursor = save_cursor;
restore_cmdline_alloc(save_cmd);
if (p == NULL)
return NULL;