From e413ea04b716effb28eb49dbc98ad3f9f761545a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 24 Nov 2021 16:20:13 +0000 Subject: patch 8.2.3664: cannot adjust sign highlighting for 'cursorline' Problem: Cannot adjust sign highlighting for 'cursorline'. Solution: Add CursorLineSign and CursorLineFold highlight groups. (Gregory Anders, closes #9201) --- runtime/doc/sign.txt | 15 +++++++++++++++ runtime/doc/syntax.txt | 4 ++++ 2 files changed, 19 insertions(+) (limited to 'runtime') diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt index 57f7dc764..96658e544 100644 --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -53,6 +53,8 @@ The color of the column is set with the SignColumn highlight group :highlight SignColumn guibg=darkgrey < +If 'cursorline' is enabled, then the CursorLineSign highlight group is used +|hl-CursorLineSign|. *sign-identifier* Each placed sign is identified by a number called the sign identifier. This identifier is used to jump to the sign or to remove the sign. The identifier @@ -171,6 +173,13 @@ See |sign_getdefined()| for the equivalent Vim script function. :sign list {name} Lists one defined sign and its attributes. + culhl={group} + Highlighting group used for the text item when the cursor is + on the same line as the sign and 'cursorline' is enabled. + + Example: > + :sign define MySign text=>> texthl=Search linehl=DiffText +< PLACING SIGNS *:sign-place* *E158* @@ -393,6 +402,9 @@ sign_define({list}) text text that is displayed when there is no icon or the GUI is not being used. texthl highlight group used for the text item + culhl highlight group used for the text item when + the cursor is on the same line as the sign and + 'cursorline' is enabled. If the sign named {name} already exists, then the attributes of the sign are updated. @@ -437,6 +449,9 @@ sign_getdefined([{name}]) *sign_getdefined()* text text that is displayed when there is no icon or the GUI is not being used. texthl highlight group used for the text item + culhl highlight group used for the text item when + the cursor is on the same line as the sign and + 'cursorline' is enabled. Returns an empty List if there are no signs and when {name} is not found. diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index db0f70f17..08d3f5f11 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -5251,6 +5251,10 @@ LineNrBelow Line number for when the 'relativenumber' *hl-CursorLineNr* CursorLineNr Like LineNr when 'cursorline' is set and 'cursorlineopt' contains "number" or is "both", for the cursor line. + *hl-CursorLineSign* +CursorLineSign Like SignColumn when 'cursorline' is set for the cursor line. + *hl-CursorLineFold* +CursorLineFold Like FoldColumn when 'cursorline' is set for the cursor line. *hl-MatchParen* MatchParen The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt| -- cgit v1.2.1