Skip to content

Commit 38df9f9

Browse files
committed
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.
1 parent d17f7a3 commit 38df9f9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/getchar.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4510,6 +4510,8 @@ eval_map_expr(str, c)
45104510
char_u *expr;
45114511
char_u *save_cmd;
45124512
pos_T save_cursor;
4513+
int save_msg_col;
4514+
int save_msg_row;
45134515

45144516
/* Remove escaping of CSI, because "str" is in a format to be used as
45154517
* typeahead. */
@@ -4533,12 +4535,16 @@ eval_map_expr(str, c)
45334535
#endif
45344536
set_vim_var_char(c); /* set v:char to the typed character */
45354537
save_cursor = curwin->w_cursor;
4538+
save_msg_col = msg_col;
4539+
save_msg_row = msg_row;
45364540
p = eval_to_string(expr, NULL, FALSE);
45374541
--textlock;
45384542
#ifdef FEAT_EX_EXTRA
45394543
--ex_normal_lock;
45404544
#endif
45414545
curwin->w_cursor = save_cursor;
4546+
msg_col = save_msg_col;
4547+
msg_row = save_msg_row;
45424548

45434549
restore_cmdline_alloc(save_cmd);
45444550
vim_free(expr);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,8 @@ static char *(features[]) =
714714

715715
static int included_patches[] =
716716
{ /* Add new patch number below this line */
717+
/**/
718+
385,
717719
/**/
718720
384,
719721
/**/

0 commit comments

Comments
 (0)