diff src/drawline.c @ 27990:27ae8ea82d7a v8.2.4520

patch 8.2.4520: using wrong highlight for cursor line number Commit: https://github.com/vim/vim/commit/127969cf98000a760826ca3a0f3781a8b79522f1 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 6 19:54:13 2022 +0000 patch 8.2.4520: using wrong highlight for cursor line number Problem: Using wrong highlight for cursor line number. Solution: Take filler lines into account when using CursorLineNr. (closes #9897)
author Bram Moolenaar <Bram@vim.org>
date Sun, 06 Mar 2022 21:00:06 +0100
parents ec6756baed23
children 28a76008e0b1
line wrap: on
line diff
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -1194,8 +1194,9 @@ win_line(
 		      if (wp->w_p_cul
 			      && lnum == wp->w_cursor.lnum
 			      && (wp->w_p_culopt_flags & CULOPT_NBR)
-			      && (row == startrow
-				  || wp->w_p_culopt_flags & CULOPT_LINE))
+			      && (row == startrow + filler_lines
+				  || (row > startrow + filler_lines
+				      && wp->w_p_culopt_flags & CULOPT_LINE)))
 			char_attr = hl_combine_attr(wcr_attr, HL_ATTR(HLF_CLN));
 #endif
 		      if (wp->w_p_rnu && lnum < wp->w_cursor.lnum