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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user