m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-14 06:13:47 -05:00

Fix #155 - Empty ANSI color code to reset color state

This commit is contained in:
Junegunn Choi
2015-03-23 01:24:31 +09:00
parent eae53576bd
commit 9d138173be
2 changed files with 11 additions and 0 deletions

View File

@@ -45,6 +45,14 @@ func TestExtractColor(t *testing.T) {
assert(offsets[0], 0, 11, -1, -1, true)
})
src = "\x1b[1mhello \x1b[mworld"
check(func(offsets []ansiOffset) {
if len(offsets) != 1 {
t.Fail()
}
assert(offsets[0], 0, 6, -1, -1, true)
})
src = "hello \x1b[34;45;1mworld"
check(func(offsets []ansiOffset) {
if len(offsets) != 1 {