vim-patch:8.2.4638: superfluous check if a redraw is needed for 'cursorline'

Problem:    Superfluous check if a redraw is needed for 'cursorline'.
Solution:   Remove check_redraw_cursorline(). (closes vim/vim#10030, closes vim/vim#10029)
3e559cd884

redraw_after_callback() is N/A.
Omits changes that just revert code from patch 8.2.4630.
This commit is contained in:
zeertzjq
2022-03-28 04:43:51 +08:00
parent a201dd265f
commit 4baeb96c1b
6 changed files with 152 additions and 26 deletions

View File

@@ -7617,16 +7617,3 @@ win_T *get_win_by_grid_handle(handle_T handle)
}
return NULL;
}
/// Check if the cursor moved and 'cursorline' is set. Mark for a VALID redraw
/// if needed.
void check_redraw_cursorline(void)
{
// 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);
}
}