mirror of
https://github.com/junegunn/fzf.git
synced 2026-08-12 19:07:00 +08:00
Make selected-fg inherit from list-fg via merge instead of override
selected-fg used o() which replaces the attr from list-fg entirely. e.g. with fg:dim,selected-fg:italic, the dim was lost on selected lines because o() replaced dim with italic instead of merging them. Use ColorAttr.Merge() so attrs are combined additively, consistent with how current-fg inherits from list-fg.
This commit is contained in:
+1
-1
@@ -1245,7 +1245,7 @@ func InitTheme(theme *ColorTheme, baseTheme *ColorTheme, boldify bool, forceBlac
|
|||||||
previewBorderDefined := theme.PreviewBorder != undefined
|
previewBorderDefined := theme.PreviewBorder != undefined
|
||||||
|
|
||||||
theme.NthSelectedAttr = theme.SelectedFg.Attr
|
theme.NthSelectedAttr = theme.SelectedFg.Attr
|
||||||
theme.SelectedFg = o(theme.ListFg, theme.SelectedFg)
|
theme.SelectedFg = theme.ListFg.Merge(theme.SelectedFg)
|
||||||
theme.SelectedBg = o(theme.ListBg, theme.SelectedBg)
|
theme.SelectedBg = o(theme.ListBg, theme.SelectedBg)
|
||||||
theme.SelectedMatch = o(theme.Match, theme.SelectedMatch)
|
theme.SelectedMatch = o(theme.Match, theme.SelectedMatch)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user