summaryrefslogtreecommitdiffstats
path: root/src/evalwindow.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-10-08 22:20:35 +0200
committerBram Moolenaar <Bram@vim.org>2019-10-08 22:20:35 +0200
commit345f28df5482cd35f5fa74b06443376379f113b0 (patch)
treee1ad21b604881812680f765790e06304c44835aa /src/evalwindow.c
parentc3e555b22f24f93aabd31943c35a9228abb6ecb6 (diff)
patch 8.1.2124: ruler is not updated if win_execute() moves cursorv8.1.2124
Problem: Ruler is not updated if win_execute() moves cursor. Solution: Update the status line. (closes #5022)
Diffstat (limited to 'src/evalwindow.c')
-rw-r--r--src/evalwindow.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/evalwindow.c b/src/evalwindow.c
index 6df14c5927..76916936dc 100644
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -655,12 +655,18 @@ f_win_execute(typval_T *argvars, typval_T *rettv)
if (wp != NULL && tp != NULL)
{
+ pos_T curpos = wp->w_cursor;
+
if (switch_win_noblock(&save_curwin, &save_curtab, wp, tp, TRUE) == OK)
{
check_cursor();
execute_common(argvars, rettv, 1);
}
restore_win_noblock(save_curwin, save_curtab, TRUE);
+
+ // Update the status line if the cursor moved.
+ if (win_valid(wp) && !EQUAL_POS(curpos, wp->w_cursor))
+ wp->w_redr_status = TRUE;
}
}