vim-patch:8.2.4591: cursor line not updated when a callback moves the cursor

Problem:    Cursor line not updated when a callback moves the cursor.
Solution:   Check if the cursor moved. (closes vim/vim#9970)
e7a74d5375

redraw_after_callback() is N/A. Nvim handles timers on the main loop.
This commit is contained in:
zeertzjq
2022-03-23 11:30:02 +08:00
parent a72f338d76
commit 3e9b4e917d
4 changed files with 83 additions and 8 deletions

View File

@@ -1296,13 +1296,7 @@ static void normal_redraw(NormalState *s)
}
// Might need to update for 'cursorline'.
// When 'cursorlineopt' is "screenline" need to redraw always.
if (curwin->w_p_cul
&& (curwin->w_last_cursorline != curwin->w_cursor.lnum
|| (curwin->w_p_culopt_flags & CULOPT_SCRLINE))
&& !char_avail()) {
redraw_later(curwin, VALID);
}
check_redraw_cursorline();
if (VIsual_active) {
update_curbuf(INVERTED); // update inverted part