Skip to content
Snippets Groups Projects
Commit b68e59a2 authored by Junegunn Choi's avatar Junegunn Choi
Browse files

Fix ANSI offset calculation

parent 4e0e4924
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ func extractColor(str *string) (*string, []ansiOffset) {
if !newState.equals(state) {
if state != nil {
// Update last offset
(&offsets[len(offsets)-1]).offset[1] = int32(output.Len())
(&offsets[len(offsets)-1]).offset[1] = int32(utf8.RuneCount(output.Bytes()))
}
if newState.colored() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment