mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-10 07:15:58 +08:00
Fix #162 - Ignore \e[K
This commit is contained in:
1 parent
9bba6bd172
commit
ce7d4a1c53
4 files changed
+14
-3
No files matched your search
@@ -53,6 +53,14 @@ func TestExtractColor(t *testing.T) {
|
||||
assert(offsets[0], 0, 6, -1, -1, true)
|
||||
})
|
||||
|
||||
src = "\x1b[1mhello \x1b[Kworld"
|
||||
check(func(offsets []ansiOffset) {
|
||||
if len(offsets) != 1 {
|
||||
t.Fail()
|
||||
}
|
||||
assert(offsets[0], 0, 11, -1, -1, true)
|
||||
})
|
||||
|
||||
src = "hello \x1b[34;45;1mworld"
|
||||
check(func(offsets []ansiOffset) {
|
||||
if len(offsets) != 1 {
|
||||
|
||||
Reference in new issue
Block a user