chore: make deps

This commit is contained in:
2025-11-11 14:18:57 +01:00
parent db7c4042d0
commit 45af67d22d
590 changed files with 22837 additions and 16387 deletions

View File

@ -4,8 +4,6 @@ import (
"bytes"
"github.com/charmbracelet/x/ansi/parser"
"github.com/mattn/go-runewidth"
"github.com/rivo/uniseg"
)
// Strip removes ANSI escape codes from a string.
@ -83,20 +81,16 @@ func stringWidth(m Method, s string) int {
}
var (
pstate = parser.GroundState // initial state
cluster string
width int
pstate = parser.GroundState // initial state
width int
)
for i := 0; i < len(s); i++ {
state, action := parser.Table.Transition(pstate, s[i])
if state == parser.Utf8State {
var w int
cluster, _, w, _ = uniseg.FirstGraphemeClusterInString(s[i:], -1)
if m == WcWidth {
w = runewidth.StringWidth(cluster)
}
cluster, w := FirstGraphemeCluster(s[i:], m)
width += w
i += len(cluster) - 1
pstate = parser.GroundState
continue