hints kitten: The option to set the text color for hints now allows arbitrary colors

Fixes #7150
This commit is contained in:
Kovid Goyal 2024-02-25 10:02:38 +05:30
parent cf49fcc4e9
commit a5f3142514
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
3 changed files with 14 additions and 5 deletions

View file

@ -57,6 +57,9 @@ Detailed list of changes
- Allow specifying where the new tab is created for :ac:`detach_window` (:pull:`7134`)
- hints kitten: The option to set the text color for hints now allows arbitrary
colors (:pull:`7150`)
0.32.2 [2024-02-12]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -167,7 +167,7 @@ func main(_ *cli.Command, o *Options, args []string) (rc int, err error) {
fctx := style.Context{AllowEscapeCodes: true}
faint := fctx.SprintFunc("dim")
hint_style := fctx.SprintFunc(fmt.Sprintf("fg=%s bg=%s bold", o.HintsForegroundColor, o.HintsBackgroundColor))
text_style := fctx.SprintFunc(fmt.Sprintf("fg=bright-%s bold", o.HintsTextColor))
text_style := fctx.SprintFunc(fmt.Sprintf("fg=%s bold", o.HintsTextColor))
highlight_mark := func(m *Mark, mark_text string) string {
hint := encode_hint(m.Index, alphabet)

View file

@ -215,19 +215,25 @@ def custom_marking() -> None:
--hints-foreground-color
default=black
type=str
The foreground color for hints.
The foreground color for hints. You can use color names or hex values. For the eight basic
named terminal colors you can also use the :code:`bright-` prefix to get the bright variant of the
color.
--hints-background-color
default=green
type=str
The background color for hints.
The background color for hints. You can use color names or hex values. For the eight basic
named terminal colors you can also use the :code:`bright-` prefix to get the bright variant of the
color.
--hints-text-color
default=gray
default=bright-gray
type=str
The foreground color for text pointed to by the hints.
The foreground color for text pointed to by the hints. You can use color names or hex values. For the eight basic
named terminal colors you can also use the :code:`bright-` prefix to get the bright variant of the
color.
--customize-processing