From 0df7d105506f3533d45afd6644991e49f3c78c5d Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 3 Oct 2025 17:28:24 +0900 Subject: Rename: '--color hidden' to '--color nomatch' --- src/options.go | 4 ++-- src/result.go | 4 ++-- src/terminal.go | 2 +- src/tui/tui.go | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/options.go b/src/options.go index aa50dc54..c2fc562d 100644 --- a/src/options.go +++ b/src/options.go @@ -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": diff --git a/src/result.go b/src/result.go index d6811dc8..4ba4bd2c 100644 --- a/src/result.go +++ b/src/result.go @@ -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)}, diff --git a/src/terminal.go b/src/terminal.go index b91687cb..f8899fd8 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -3714,7 +3714,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) } diff --git a/src/tui/tui.go b/src/tui/tui.go index 33fb626f..ca3d5531 100644 --- a/src/tui/tui.go +++ b/src/tui/tui.go @@ -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) -- cgit v1.2.3