diff src/main.c @ 28133:373f1afadfa3 v8.2.4591

patch 8.2.4591: cursor line not updated when a callback moves the cursor Commit: https://github.com/vim/vim/commit/e7a74d53754765f22ef8ce71c915bb669d5f7f3f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 19 11:10:15 2022 +0000 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 https://github.com/vim/vim/issues/9970)
author Bram Moolenaar <Bram@vim.org>
date Sat, 19 Mar 2022 12:15:04 +0100
parents 41a61dbb46d2
children c99005ffa8c3
line wrap: on
line diff
--- a/src/main.c
+++ b/src/main.c
@@ -1386,12 +1386,7 @@ main_loop(
 
 #ifdef FEAT_SYN_HL
 	    // 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(VALID);
+	    check_redraw_cursorline();
 #endif
 	    if (VIsual_active)
 		update_curbuf(INVERTED); // update inverted part