mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 23:38:17 +00:00
vim-patch:8.1.0372: screen updating slow when 'cursorline' is set (#8986)
Problem: Screen updating slow when 'cursorline' is set.
Solution: Only redraw the old and new cursor line, not all lines.
90a997987d
This commit is contained in:
@@ -1534,12 +1534,14 @@ void edit_putchar(int c, int highlight)
|
||||
void edit_unputchar(void)
|
||||
{
|
||||
if (pc_status != PC_STATUS_UNSET && pc_row >= msg_scrolled) {
|
||||
if (pc_status == PC_STATUS_RIGHT)
|
||||
++curwin->w_wcol;
|
||||
if (pc_status == PC_STATUS_RIGHT || pc_status == PC_STATUS_LEFT)
|
||||
redrawWinline(curwin->w_cursor.lnum, FALSE);
|
||||
else
|
||||
if (pc_status == PC_STATUS_RIGHT) {
|
||||
curwin->w_wcol++;
|
||||
}
|
||||
if (pc_status == PC_STATUS_RIGHT || pc_status == PC_STATUS_LEFT) {
|
||||
redrawWinline(curwin, curwin->w_cursor.lnum, false);
|
||||
} else {
|
||||
screen_puts(pc_bytes, pc_row - msg_scrolled, pc_col, pc_attr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1576,7 +1578,7 @@ static void undisplay_dollar(void)
|
||||
{
|
||||
if (dollar_vcol >= 0) {
|
||||
dollar_vcol = -1;
|
||||
redrawWinline(curwin->w_cursor.lnum, FALSE);
|
||||
redrawWinline(curwin, curwin->w_cursor.lnum, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5909,7 +5911,7 @@ static void check_spell_redraw(void)
|
||||
linenr_T lnum = spell_redraw_lnum;
|
||||
|
||||
spell_redraw_lnum = 0;
|
||||
redrawWinline(lnum, FALSE);
|
||||
redrawWinline(curwin, lnum, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user