mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-01 12:42:01 -07:00
Use default bg color when fg is set to -1 with reverse attribute
This commit is contained in:
@@ -554,6 +554,9 @@ func initTheme(theme *ColorTheme, baseTheme *ColorTheme, forceBlack bool) {
|
|||||||
|
|
||||||
func initPalette(theme *ColorTheme) {
|
func initPalette(theme *ColorTheme) {
|
||||||
pair := func(fg, bg ColorAttr) ColorPair {
|
pair := func(fg, bg ColorAttr) ColorPair {
|
||||||
|
if fg.Color == colDefault && (fg.Attr&Reverse) > 0 {
|
||||||
|
bg.Color = colDefault
|
||||||
|
}
|
||||||
return ColorPair{fg.Color, bg.Color, fg.Attr}
|
return ColorPair{fg.Color, bg.Color, fg.Attr}
|
||||||
}
|
}
|
||||||
blank := theme.Fg
|
blank := theme.Fg
|
||||||
|
Reference in New Issue
Block a user