diff options
-rw-r--r-- | src/ansi.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ansi.go b/src/ansi.go index 126a9920..116282c1 100644 --- a/src/ansi.go +++ b/src/ansi.go @@ -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() { |