aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/change.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-08-02 19:23:57 -0400
committerGitHub <noreply@github.com>2021-08-02 19:23:57 -0400
commit8baf7bce2b51e8d3d47b6c70ce054663d927639a (patch)
treeca10917fd84e011306b3303829704232b7f2f682 /src/nvim/change.c
parent93443d59a9680a6055d4602653d34516bc2c2571 (diff)
parentc24daf5a1013c629f82ba8d4a4de885d7986d982 (diff)
downloadrneovim-8baf7bce2b51e8d3d47b6c70ce054663d927639a.tar.gz
rneovim-8baf7bce2b51e8d3d47b6c70ce054663d927639a.tar.bz2
rneovim-8baf7bce2b51e8d3d47b6c70ce054663d927639a.zip
Merge pull request #15226 from zeertzjq/vim-8.1.2029
vim-patch:8.1.2029,8.1.2117,8.1.2214,8.2.3204
Diffstat (limited to 'src/nvim/change.c')
-rw-r--r--src/nvim/change.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/nvim/change.c b/src/nvim/change.c
index 04552f6703..49e403425a 100644
--- a/src/nvim/change.c
+++ b/src/nvim/change.c
@@ -290,13 +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.
- if (wp->w_p_rnu
- || (wp->w_p_cul && lnum <= wp->w_last_cursorline)) {
+ // 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);
+ }
+ }
}
}