diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2015-05-22 02:20:10 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-05-22 02:20:10 +0900 |
commit | b68e59a24b0bcbe84bbea2307b363d6510da3c9c (patch) | |
tree | 5be024f3d4370628c4c506ec18bcd25b441534d0 /src/ansi.go | |
parent | 4e0e492427a6517a9311546da10a4e4b91d883e5 (diff) |
Fix ANSI offset calculation0.9.12
Diffstat (limited to 'src/ansi.go')
-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() { |