patch 8.1.2124: ruler is not updated if win_execute() moves cursor
Problem: Ruler is not updated if win_execute() moves cursor.
Solution: Update the status line. (closes #5022)
diff --git a/src/evalwindow.c b/src/evalwindow.c
index 6df14c5..7691693 100644
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -655,12 +655,18 @@
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;
}
}