mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
vim-patch:8.1.2214: too much is redrawn when 'cursorline' is set
Problem: Too much is redrawn when 'cursorline' is set.
Solution: Don't do a complete redraw. (closes vim/vim#5079)
11a58af66f
This commit is contained in:
@@ -290,14 +290,21 @@ static void changed_common(linenr_T lnum, colnr_T col, linenr_T lnume,
|
||||
set_topline(wp, wp->w_topline);
|
||||
}
|
||||
|
||||
// Relative numbering may require updating more. Cursor line
|
||||
// highlighting probably needs to be updated if it's below the
|
||||
// change (or is using screenline highlighting).
|
||||
if (wp->w_p_rnu
|
||||
|| ((wp->w_p_cul && lnum <= wp->w_last_cursorline)
|
||||
|| (wp->w_p_culopt_flags & CULOPT_SCRLINE))) {
|
||||
// Relative numbering may require updating more.
|
||||
if (wp->w_p_rnu) {
|
||||
redraw_later(wp, SOME_VALID);
|
||||
}
|
||||
|
||||
// Cursor line highlighting probably need to be updated with
|
||||
// "VALID" if it's below the change.
|
||||
// If the cursor line is inside the change we need to redraw more.
|
||||
if (wp->w_p_cul) {
|
||||
if (xtra == 0) {
|
||||
redraw_later(wp, VALID);
|
||||
} else if (lnum <= wp->w_last_cursorline) {
|
||||
redraw_later(wp, SOME_VALID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user