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

Fix '--color nth:regular' not to reset ANSI attributes of the original text

This commit is contained in:
Junegunn Choi
2025-08-03 00:50:38 +09:00
parent af0014aba8
commit 179aec1578
2 changed files with 2 additions and 1 deletions

View File

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