diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-10-01 23:47:09 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-10-09 00:17:00 +0900 |
| commit | 91beacf0f4966e0e5ddbcdedae008d8a66f93ab9 (patch) | |
| tree | 978a5cdb30bcf2ce8f9faacda024a2baffa83af1 /src/result_test.go | |
| parent | e6ad01fb90df7e324068f61ae96e056f327959c7 (diff) | |
| download | fzf-91beacf0f4966e0e5ddbcdedae008d8a66f93ab9.tar.gz | |
Add special 'strip' style attribute for stripping colors
Test cases:
fd --color always | fzf --ansi --delimiter /
fd --color always | fzf --ansi --delimiter / --nth -1 --color fg:dim,nth:regular
fd --color always | fzf --ansi --delimiter / --nth -1 --color fg:dim:strip,nth:regular
fd --color always | fzf --ansi --delimiter / --nth -1 --color fg:dim:strip,nth:regular --raw
fd --color always | fzf --ansi --delimiter / --nth -1 --color fg:dim:strip,nth:regular,hidden:strikethrough --raw
fd --color always | fzf --ansi --delimiter / --nth -1 --color fg:dim:strip,nth:regular,hidden:strip:strikethrough --raw
fd --color always | fzf --ansi --delimiter / --nth -1 --color fg:dim:strip,nth:regular,hidden:strip:dim:strikethrough --raw
Diffstat (limited to 'src/result_test.go')
| -rw-r--r-- | src/result_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/result_test.go b/src/result_test.go index 6e6d4387..1f6a003e 100644 --- a/src/result_test.go +++ b/src/result_test.go @@ -131,7 +131,7 @@ func TestColorOffset(t *testing.T) { colBase := tui.NewColorPair(89, 189, tui.AttrUndefined) colMatch := tui.NewColorPair(99, 199, tui.AttrUndefined) - colors := item.colorOffsets(offsets, nil, tui.Dark256, colBase, colMatch, tui.AttrUndefined) + colors := item.colorOffsets(offsets, nil, tui.Dark256, colBase, colMatch, tui.AttrUndefined, false) assert := func(idx int, b int32, e int32, c tui.ColorPair) { o := colors[idx] if o.offset[0] != b || o.offset[1] != e || o.color != c { @@ -158,7 +158,7 @@ func TestColorOffset(t *testing.T) { nthOffsets := []Offset{{37, 39}, {42, 45}} for _, attr := range []tui.Attr{tui.AttrRegular, tui.StrikeThrough} { - colors = item.colorOffsets(offsets, nthOffsets, tui.Dark256, colRegular, colUnderline, attr) + colors = item.colorOffsets(offsets, nthOffsets, tui.Dark256, colRegular, colUnderline, attr, false) // [{[0 5] {1 5 0}} {[5 15] {1 5 8}} {[15 20] {1 5 0}} // {[22 25] {2 6 1}} {[25 27] {2 6 9}} {[27 30] {-1 -1 8}} |
