1
0
mirror of https://github.com/rivo/tview.git synced 2025-04-24 13:48:56 +08:00

Fixed string position for escaped sequences. Fixes #886

This commit is contained in:
Oliver 2023-09-16 11:21:02 +02:00
parent a39fe28ba4
commit 8a0aeb0aa3

View File

@ -156,7 +156,7 @@ func step(str string, state *stepState, opts stepOptions) (cluster, rest string,
} else if cluster[0] == '[' { // Starting closing sequence.
// Swallow the first one.
cluster, rest, state.boundaries, state.unisegState = uniseg.StepString(rest, preState)
state.grossLength = len(cluster)
state.grossLength += len(cluster)
if cluster[0] == ']' {
state.escapedTagState = etNone
} else {