m/fzf
1
0
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:
Junegunn Choi
2025-10-03 17:28:24 +09:00
parent e7e7bc3315
commit e393fda2fb
6 changed files with 44 additions and 23 deletions

View File

@@ -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":

View File

@@ -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)},

View File

@@ -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)
}

View File

@@ -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)