m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 00:03:39 -05:00

Support full-line background color in the list section

Close #4432
This commit is contained in:
Junegunn Choi
2025-06-24 22:50:02 +09:00
parent 8d81730ec2
commit 4811e52af3
7 changed files with 106 additions and 22 deletions

View File

@@ -273,6 +273,10 @@ func NewColorPair(fg Color, bg Color, attr Attr) ColorPair {
return ColorPair{fg, bg, attr}
}
func NoColorPair() ColorPair {
return ColorPair{-1, -1, 0}
}
func (p ColorPair) Fg() Color {
return p.fg
}
@@ -285,6 +289,10 @@ func (p ColorPair) Attr() Attr {
return p.attr
}
func (p ColorPair) IsFullBgMarker() bool {
return p.attr&FullBg > 0
}
func (p ColorPair) HasBg() bool {
return p.attr&Reverse == 0 && p.bg != colDefault ||
p.attr&Reverse > 0 && p.fg != colDefault