comparison 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
comparison
equal deleted inserted replaced
27989:f20524524525 27990:27ae8ea82d7a
1192 // TODO: Can we use CursorLine instead of CursorLineNr 1192 // TODO: Can we use CursorLine instead of CursorLineNr
1193 // when CursorLineNr isn't set? 1193 // when CursorLineNr isn't set?
1194 if (wp->w_p_cul 1194 if (wp->w_p_cul
1195 && lnum == wp->w_cursor.lnum 1195 && lnum == wp->w_cursor.lnum
1196 && (wp->w_p_culopt_flags & CULOPT_NBR) 1196 && (wp->w_p_culopt_flags & CULOPT_NBR)
1197 && (row == startrow 1197 && (row == startrow + filler_lines
1198 || wp->w_p_culopt_flags & CULOPT_LINE)) 1198 || (row > startrow + filler_lines
1199 && wp->w_p_culopt_flags & CULOPT_LINE)))
1199 char_attr = hl_combine_attr(wcr_attr, HL_ATTR(HLF_CLN)); 1200 char_attr = hl_combine_attr(wcr_attr, HL_ATTR(HLF_CLN));
1200 #endif 1201 #endif
1201 if (wp->w_p_rnu && lnum < wp->w_cursor.lnum 1202 if (wp->w_p_rnu && lnum < wp->w_cursor.lnum
1202 && HL_ATTR(HLF_LNA) != 0) 1203 && HL_ATTR(HLF_LNA) != 0)
1203 // Use LineNrAbove 1204 // Use LineNrAbove