mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 00:03:39 -05:00
Rename: '--color hidden' to '--color nomatch'
This commit is contained in:
@@ -1455,8 +1455,8 @@ func parseTheme(defaultTheme *tui.ColorTheme, str string) (*tui.ColorTheme, *tui
|
||||
mergeAttr(&theme.SelectedBg)
|
||||
case "nth":
|
||||
mergeAttr(&theme.Nth)
|
||||
case "hidden":
|
||||
mergeAttr(&theme.Hidden)
|
||||
case "nomatch":
|
||||
mergeAttr(&theme.Nomatch)
|
||||
case "gutter":
|
||||
mergeAttr(&theme.Gutter)
|
||||
case "hl":
|
||||
|
||||
@@ -256,7 +256,7 @@ func (result *Result) colorOffsets(matchOffsets []Offset, nthOffsets []Offset, t
|
||||
base = base.WithAttr(attrNth)
|
||||
}
|
||||
if hidden {
|
||||
base = base.WithFg(theme.Hidden)
|
||||
base = base.WithFg(theme.Nomatch)
|
||||
}
|
||||
color := ansiToColorPair(ansi, base)
|
||||
colors = append(colors, colorOffset{
|
||||
@@ -267,7 +267,7 @@ func (result *Result) colorOffsets(matchOffsets []Offset, nthOffsets []Offset, t
|
||||
} else {
|
||||
color := colBase.WithAttr(attrNth)
|
||||
if hidden {
|
||||
color = color.WithFg(theme.Hidden)
|
||||
color = color.WithFg(theme.Nomatch)
|
||||
}
|
||||
colors = append(colors, colorOffset{
|
||||
offset: [2]int32{int32(start), int32(idx)},
|
||||
|
||||
@@ -3707,7 +3707,7 @@ func (t *Terminal) printHighlighted(result Result, colBase tui.ColorPair, colMat
|
||||
if maxWidth > 0 {
|
||||
color := colBase
|
||||
if hidden {
|
||||
color = color.WithFg(t.theme.Hidden)
|
||||
color = color.WithFg(t.theme.Nomatch)
|
||||
}
|
||||
t.printColoredString(t.window, line, offsets, color)
|
||||
}
|
||||
|
||||
@@ -447,7 +447,7 @@ type ColorTheme struct {
|
||||
ListBg ColorAttr
|
||||
AltBg ColorAttr
|
||||
Nth ColorAttr
|
||||
Hidden ColorAttr
|
||||
Nomatch ColorAttr
|
||||
SelectedFg ColorAttr
|
||||
SelectedBg ColorAttr
|
||||
SelectedMatch ColorAttr
|
||||
@@ -908,7 +908,7 @@ func init() {
|
||||
FooterLabel: defaultColor,
|
||||
GapLine: defaultColor,
|
||||
Nth: undefined,
|
||||
Hidden: undefined,
|
||||
Nomatch: undefined,
|
||||
}
|
||||
|
||||
EmptyTheme = &ColorTheme{
|
||||
@@ -958,7 +958,7 @@ func init() {
|
||||
FooterLabel: undefined,
|
||||
GapLine: undefined,
|
||||
Nth: undefined,
|
||||
Hidden: undefined,
|
||||
Nomatch: undefined,
|
||||
}
|
||||
|
||||
Default16 = &ColorTheme{
|
||||
@@ -1008,7 +1008,7 @@ func init() {
|
||||
FooterLabel: undefined,
|
||||
GapLine: undefined,
|
||||
Nth: undefined,
|
||||
Hidden: undefined,
|
||||
Nomatch: undefined,
|
||||
}
|
||||
|
||||
Dark256 = &ColorTheme{
|
||||
@@ -1058,7 +1058,7 @@ func init() {
|
||||
FooterLabel: undefined,
|
||||
GapLine: undefined,
|
||||
Nth: undefined,
|
||||
Hidden: undefined,
|
||||
Nomatch: undefined,
|
||||
}
|
||||
|
||||
Light256 = &ColorTheme{
|
||||
@@ -1108,7 +1108,7 @@ func init() {
|
||||
FooterLabel: undefined,
|
||||
GapLine: undefined,
|
||||
Nth: undefined,
|
||||
Hidden: undefined,
|
||||
Nomatch: undefined,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1248,8 +1248,8 @@ func InitTheme(theme *ColorTheme, baseTheme *ColorTheme, boldify bool, forceBlac
|
||||
theme.Spinner = boldify(theme.Spinner)
|
||||
}
|
||||
|
||||
if theme.Hidden.IsUndefined() {
|
||||
theme.Hidden.Attr = Dim
|
||||
if theme.Nomatch.IsUndefined() {
|
||||
theme.Nomatch.Attr = Dim
|
||||
}
|
||||
|
||||
initPalette(theme)
|
||||
|
||||
Reference in New Issue
Block a user