Skip to content
Myr

Fix ANSI offset calculation

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 4e0e492 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/ansi.go+1 added-1 removed
48 unmodified lines
4950 if !newState.equals(state) {51 if state != nil {52 // Update last offset53 (&offsets[len(offsets)-1]).offset[1] = int32(output.Len())53 (&offsets[len(offsets)-1]).offset[1] = int32(utf8.RuneCount(output.Bytes()))54 }5556 if newState.colored() {57 // Append new offset
91 unmodified lines