0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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)
This commit is contained in:
Bram Moolenaar
2019-10-08 22:20:35 +02:00
parent c3e555b22f
commit 345f28df54
3 changed files with 28 additions and 0 deletions

View File

@@ -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;
}
}