mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.3.385
Problem: When using an expression mapping on the command line the cursor ends up in the wrong place. (Yasuhiro Matsumoto) Solution: Save and restore msg_col and msg_row when evaluating the expression.
This commit is contained in:
@@ -4510,6 +4510,8 @@ eval_map_expr(str, c)
|
|||||||
char_u *expr;
|
char_u *expr;
|
||||||
char_u *save_cmd;
|
char_u *save_cmd;
|
||||||
pos_T save_cursor;
|
pos_T save_cursor;
|
||||||
|
int save_msg_col;
|
||||||
|
int save_msg_row;
|
||||||
|
|
||||||
/* Remove escaping of CSI, because "str" is in a format to be used as
|
/* Remove escaping of CSI, because "str" is in a format to be used as
|
||||||
* typeahead. */
|
* typeahead. */
|
||||||
@@ -4533,12 +4535,16 @@ eval_map_expr(str, c)
|
|||||||
#endif
|
#endif
|
||||||
set_vim_var_char(c); /* set v:char to the typed character */
|
set_vim_var_char(c); /* set v:char to the typed character */
|
||||||
save_cursor = curwin->w_cursor;
|
save_cursor = curwin->w_cursor;
|
||||||
|
save_msg_col = msg_col;
|
||||||
|
save_msg_row = msg_row;
|
||||||
p = eval_to_string(expr, NULL, FALSE);
|
p = eval_to_string(expr, NULL, FALSE);
|
||||||
--textlock;
|
--textlock;
|
||||||
#ifdef FEAT_EX_EXTRA
|
#ifdef FEAT_EX_EXTRA
|
||||||
--ex_normal_lock;
|
--ex_normal_lock;
|
||||||
#endif
|
#endif
|
||||||
curwin->w_cursor = save_cursor;
|
curwin->w_cursor = save_cursor;
|
||||||
|
msg_col = save_msg_col;
|
||||||
|
msg_row = save_msg_row;
|
||||||
|
|
||||||
restore_cmdline_alloc(save_cmd);
|
restore_cmdline_alloc(save_cmd);
|
||||||
vim_free(expr);
|
vim_free(expr);
|
||||||
|
@@ -714,6 +714,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
385,
|
||||||
/**/
|
/**/
|
||||||
384,
|
384,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user