aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-08-25 22:17:34 -0400
committerJustin M. Keyes <justinkz@gmail.com>2019-08-26 04:17:34 +0200
commitebc3070b7d6dcf4953f6dd9400b26a8510403ec8 (patch)
tree0e5d5e56904323ddbb735ab5f75c8f06ab053e7b
parente3e0574cb3feac4f539383d47f82d0b6e04d8c9b (diff)
downloadrneovim-ebc3070b7d6dcf4953f6dd9400b26a8510403ec8.tar.gz
rneovim-ebc3070b7d6dcf4953f6dd9400b26a8510403ec8.tar.bz2
rneovim-ebc3070b7d6dcf4953f6dd9400b26a8510403ec8.zip
vim-patch:8.1.1926: redraw cursorline after putting line above #10849
Problem: Cursorline not redrawn when putting a line above the cursor. Solution: Redraw when the curor line is below a change. (closes vim/vim#4862) https://github.com/vim/vim/commit/c2b97643a82bb9fbd202312dac4aa995f92e9e5b
-rw-r--r--src/nvim/change.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/change.c b/src/nvim/change.c
index 2363578139..f8a4cf4282 100644
--- a/src/nvim/change.c
+++ b/src/nvim/change.c
@@ -289,8 +289,11 @@ 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
- if (wp->w_p_rnu) {
+ // Relative numbering may require updating more. Cursor line
+ // highlighting probably needs to be updated if it's below the
+ // change.
+ if (wp->w_p_rnu
+ || (wp->w_p_cul && lnum <= wp->w_last_cursorline)) {
redraw_win_later(wp, SOME_VALID);
}
}