vim-patch:9.2.1038: CursorLineFold/Sign highlighting depends on 'cursorlineopt' (#41785)

Problem:  CursorLineFold and CursorLineSign are only applied when
          'cursorlineopt' contains "number" or is "both"
          (Evgeni Chasnovski).
Solution: Apply those groups whenever 'cursorline' is set, independent
          of 'cursorlineopt' (Vrushali Zampalkar).

fixes:  vim/vim#20480
closes: vim/vim#21112

1f8d3c44c5

Co-authored-by: Vrushali-Z <zampalkarvasu@gmail.com>
This commit is contained in:
zeertzjq
2026-09-08 23:24:45 +08:00
committed by GitHub
parent 623508dc06
commit e66fdc1eac
8 changed files with 84 additions and 12 deletions

View File

@@ -1624,7 +1624,14 @@ vim.o.cuc = vim.o.cursorcolumn
vim.wo.cursorcolumn = vim.o.cursorcolumn
vim.wo.cuc = vim.wo.cursorcolumn
--- Highlight the text line of the cursor with CursorLine `hl-CursorLine`.
--- Highlighting used for the line the cursor is on:
---
--- CursorLine the text line `hl-CursorLine`
--- CursorLineFold the fold column `hl-CursorLineFold`
--- CursorLineSign the sign column `hl-CursorLineSign`
--- CursorLineNr the line number, when 'cursorlineopt' contains
--- "number" `hl-CursorLineNr`
---
--- Useful to easily spot the cursor. Will make screen redrawing slower.
--- When Visual mode is active the highlighting isn't used to make it
--- easier to see the selected text.