aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/move.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-24 20:28:46 +0800
committerGitHub <noreply@github.com>2022-03-24 20:28:46 +0800
commit3b28bd57f9131a71b17265d18d5e0a7a8cedb84b (patch)
treeb98f3fa9fb4a16fe681ea7e28b4bfd69cb4532bc /src/nvim/move.c
parent1194856b3167f4a37e7d0b985053112a44f61288 (diff)
parentc29a14d1fa58d5472bd14fec99c5b4228ed38b24 (diff)
downloadrneovim-3b28bd57f9131a71b17265d18d5e0a7a8cedb84b.tar.gz
rneovim-3b28bd57f9131a71b17265d18d5e0a7a8cedb84b.tar.bz2
rneovim-3b28bd57f9131a71b17265d18d5e0a7a8cedb84b.zip
Merge pull request #17821 from zeertzjq/vim-patch-cursorline
vim-patch:8.2.{4591,4614}: cursorline redrawing
Diffstat (limited to 'src/nvim/move.c')
-rw-r--r--src/nvim/move.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c
index 27cc2b341c..751e0046bc 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -95,11 +95,6 @@ static void comp_botline(win_T *wp)
win_check_anchored_floats(wp);
}
-void reset_cursorline(void)
-{
- curwin->w_last_cursorline = 0;
-}
-
// Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is set.
void redraw_for_cursorline(win_T *wp)
FUNC_ATTR_NONNULL_ALL
@@ -107,21 +102,8 @@ void redraw_for_cursorline(win_T *wp)
if ((wp->w_p_rnu || win_cursorline_standout(wp))
&& (wp->w_valid & VALID_CROW) == 0
&& !pum_visible()) {
- if (wp->w_p_rnu) {
- // win_line() will redraw the number column only.
- redraw_later(wp, VALID);
- }
- if (win_cursorline_standout(wp)) {
- if (wp->w_redr_type <= VALID && wp->w_last_cursorline != 0) {
- // "w_last_cursorline" may be outdated, worst case we redraw
- // too much. This is optimized for moving the cursor around in
- // the current window.
- redrawWinline(wp, wp->w_last_cursorline);
- redrawWinline(wp, wp->w_cursor.lnum);
- } else {
- redraw_later(wp, SOME_VALID);
- }
- }
+ // win_line() will redraw the number column and cursorline only.
+ redraw_later(wp, VALID);
}
}