m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-20 01:23:43 -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:
Junegunn Choi
2025-05-30 20:52:13 +09:00
parent a9d1d42436
commit 15d6c17390
2 changed files with 4 additions and 3 deletions

View File

@@ -176,7 +176,7 @@ func TestColorOffset(t *testing.T) {
assert(9, 35, 37, tui.NewColorPair(4, 8, tui.Bold))
expected := tui.Bold | attr
if attr == tui.AttrRegular {
expected = tui.AttrRegular
expected = tui.Bold
}
assert(10, 37, 39, tui.NewColorPair(4, 8, expected))
assert(11, 39, 40, tui.NewColorPair(4, 8, tui.Bold))