aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-09-12 23:06:26 +0200
committerGitHub <noreply@github.com>2018-09-12 23:06:26 +0200
commit7a26b9b62b5c5c69b4ea700eb8541721a763e734 (patch)
treecb9e061b24ca1229a591a33e801c09e02afbb11f /src/nvim/edit.c
parent9124bb755c410386efd3f030e54b2fbbe3fec193 (diff)
downloadrneovim-7a26b9b62b5c5c69b4ea700eb8541721a763e734.tar.gz
rneovim-7a26b9b62b5c5c69b4ea700eb8541721a763e734.tar.bz2
rneovim-7a26b9b62b5c5c69b4ea700eb8541721a763e734.zip
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. https://github.com/vim/vim/commit/90a997987dbbe43af3c15118a35f658f0f037d1d
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index d0994d35f5..d29ea7f164 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -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);
}
}