Fix duplicate rendering of the last line in preview window

This commit is contained in:
Junegunn Choi 2016-07-15 23:24:14 +09:00
parent 6a52f8b8dd
commit a9a29dff4f
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -49,7 +49,7 @@ func extractColor(str string, state *ansiState, proc func(string, *ansiState) bo
prev := str[idx:offset[0]] prev := str[idx:offset[0]]
output.WriteString(prev) output.WriteString(prev)
if proc != nil && !proc(prev, state) { if proc != nil && !proc(prev, state) {
break return "", nil, nil
} }
newState := interpretCode(str[offset[0]:offset[1]], state) newState := interpretCode(str[offset[0]:offset[1]], state)