mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 08:13:40 -05:00
Fix ANSI attributes lost when nth:regular is set
Example: # foo was not displayed in italic echo -e "\x1b[33;3mfoo \x1b[mbar" | fzf --ansi --color fg:dim,nth:regular --nth 1
This commit is contained in:
@@ -228,10 +228,11 @@ func (result *Result) colorOffsets(matchOffsets []Offset, nthOffsets []Offset, t
|
||||
offset: [2]int32{int32(start), int32(idx)}, color: color, match: true, url: url})
|
||||
} else if curr.color {
|
||||
ansi := itemColors[curr.index]
|
||||
color := ansiToColorPair(ansi, colBase)
|
||||
base := colBase
|
||||
if curr.nth {
|
||||
color = color.WithAttr(attrNth)
|
||||
base = base.WithAttr(attrNth)
|
||||
}
|
||||
color := ansiToColorPair(ansi, base)
|
||||
colors = append(colors, colorOffset{
|
||||
offset: [2]int32{int32(start), int32(idx)},
|
||||
color: color,
|
||||
|
||||
Reference in New Issue
Block a user