aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-23 11:30:02 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-03-24 16:08:59 +0800
commit3e9b4e917d0783d0414192c3ad231cfcb813e73f (patch)
tree5e95003eea2e5076fa8db2efdcbf3970302a66bc /src/nvim/normal.c
parenta72f338d76c871869712518df862c85d1df25f54 (diff)
downloadrneovim-3e9b4e917d0783d0414192c3ad231cfcb813e73f.tar.gz
rneovim-3e9b4e917d0783d0414192c3ad231cfcb813e73f.tar.bz2
rneovim-3e9b4e917d0783d0414192c3ad231cfcb813e73f.zip
vim-patch:8.2.4591: cursor line not updated when a callback moves the cursor
Problem: Cursor line not updated when a callback moves the cursor. Solution: Check if the cursor moved. (closes vim/vim#9970) https://github.com/vim/vim/commit/e7a74d53754765f22ef8ce71c915bb669d5f7f3f redraw_after_callback() is N/A. Nvim handles timers on the main loop.
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index f402865d2d..e773351d63 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -1296,13 +1296,7 @@ static void normal_redraw(NormalState *s)
}
// Might need to update for 'cursorline'.
- // When 'cursorlineopt' is "screenline" need to redraw always.
- if (curwin->w_p_cul
- && (curwin->w_last_cursorline != curwin->w_cursor.lnum
- || (curwin->w_p_culopt_flags & CULOPT_SCRLINE))
- && !char_avail()) {
- redraw_later(curwin, VALID);
- }
+ check_redraw_cursorline();
if (VIsual_active) {
update_curbuf(INVERTED); // update inverted part