Add current-{fg,bg,hl} as synonyms for {fg,bg,hl}+

This commit is contained in:
Junegunn Choi 2024-05-07 01:26:25 +09:00
parent e8405f40fe
commit 9e4780510e
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
2 changed files with 6 additions and 6 deletions

View File

@ -468,10 +468,10 @@ color mappings.
\fBbg \fRBackground \fBbg \fRBackground
\fBpreview-bg \fRPreview window background \fBpreview-bg \fRPreview window background
\fBhl \fRHighlighted substrings \fBhl \fRHighlighted substrings
\fBfg+ \fRText (current line) \fBcurrent-fg (fg+) \fRText (current line)
\fBbg+ \fRBackground (current line) \fBcurrent-bg (bg+) \fRBackground (current line)
\fBgutter \fRGutter on the left \fBgutter \fRGutter on the left
\fBhl+ \fRHighlighted substrings (current line) \fBcurrent-hl (hl+) \fRHighlighted substrings (current line)
\fBquery \fRQuery string \fBquery \fRQuery string
\fBdisabled \fRQuery string when search is disabled (\fB--disabled\fR) \fBdisabled \fRQuery string when search is disabled (\fB--disabled\fR)
\fBinfo \fRInfo line (match counters) \fBinfo \fRInfo line (match counters)

View File

@ -980,15 +980,15 @@ func parseTheme(defaultTheme *tui.ColorTheme, str string) (*tui.ColorTheme, erro
mergeAttr(&theme.PreviewFg) mergeAttr(&theme.PreviewFg)
case "preview-bg": case "preview-bg":
mergeAttr(&theme.PreviewBg) mergeAttr(&theme.PreviewBg)
case "fg+": case "current-fg", "fg+":
mergeAttr(&theme.Current) mergeAttr(&theme.Current)
case "bg+": case "current-bg", "bg+":
mergeAttr(&theme.DarkBg) mergeAttr(&theme.DarkBg)
case "gutter": case "gutter":
mergeAttr(&theme.Gutter) mergeAttr(&theme.Gutter)
case "hl": case "hl":
mergeAttr(&theme.Match) mergeAttr(&theme.Match)
case "hl+": case "current-hl", "hl+":
mergeAttr(&theme.CurrentMatch) mergeAttr(&theme.CurrentMatch)
case "border": case "border":
mergeAttr(&theme.Border) mergeAttr(&theme.Border)