From 179aec1578004c705522f5dc47190494988797b4 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 3 Aug 2025 00:50:38 +0900 Subject: Fix '--color nth:regular' not to reset ANSI attributes of the original text --- src/result.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/result.go b/src/result.go index 3dfd58cc..0ad0994e 100644 --- a/src/result.go +++ b/src/result.go @@ -237,7 +237,7 @@ func (result *Result) colorOffsets(matchOffsets []Offset, nthOffsets []Offset, t if color.Fg().IsDefault() && origColor.HasBg() { color = origColor if curr.nth { - color = color.WithAttr(attrNth) + color = color.WithAttr(attrNth &^ tui.AttrRegular) } } else { color = origColor.MergeNonDefault(color) -- cgit v1.2.3