diff src/evalwindow.c @ 18259:f254dd2bc107 v8.1.2124

patch 8.1.2124: ruler is not updated if win_execute() moves cursor Commit: https://github.com/vim/vim/commit/345f28df5482cd35f5fa74b06443376379f113b0 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Oct 8 22:20:35 2019 +0200 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 https://github.com/vim/vim/issues/5022)
author Bram Moolenaar <Bram@vim.org>
date Tue, 08 Oct 2019 22:30:04 +0200
parents f4b51934d4f8
children 49b78d6465e5
line wrap: on
line diff
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -655,12 +655,18 @@ f_win_execute(typval_T *argvars, typval_
 
     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;
     }
 }