mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
perf: only redraw concealed line if cursor has moved horizontally
Building upon #17889, this moves conceal redrawing logic into move.c, so that concealed line is only redrawn if cursor has moved horizontally.
This commit is contained in:
@@ -1288,13 +1288,6 @@ static void normal_redraw(NormalState *s)
|
||||
update_topline(curwin);
|
||||
validate_cursor();
|
||||
|
||||
// If the cursor moves horizontally when 'concealcursor' is active, then the
|
||||
// current line needs to be redrawn in order to calculate the correct
|
||||
// cursor position.
|
||||
if (curwin->w_p_cole > 0 && conceal_cursor_line(curwin)) {
|
||||
redrawWinline(curwin, curwin->w_cursor.lnum);
|
||||
}
|
||||
|
||||
if (VIsual_active) {
|
||||
update_curbuf(INVERTED); // update inverted part
|
||||
} else if (must_redraw) {
|
||||
|
Reference in New Issue
Block a user