summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-07-15 23:24:14 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-07-15 23:24:14 +0900
commita9a29dff4f7f2192ba5812e50b4c2efa23103efb (patch)
tree5fe9c2d7f7d0639e7448f6040c28a268467ac24a
parent6a52f8b8dd622ff3f56d869fa616ba095a24ddee (diff)
Fix duplicate rendering of the last line in preview window
-rw-r--r--src/ansi.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ansi.go b/src/ansi.go
index debba474..56831eee 100644
--- a/src/ansi.go
+++ b/src/ansi.go
@@ -49,7 +49,7 @@ func extractColor(str string, state *ansiState, proc func(string, *ansiState) bo
prev := str[idx:offset[0]]
output.WriteString(prev)
if proc != nil && !proc(prev, state) {
- break
+ return "", nil, nil
}
newState := interpretCode(str[offset[0]:offset[1]], state)