Skip to content

Commit ecfae8e

Browse files
authored
chore: remove runewidth dep (#220)
1 parent 48e54a2 commit ecfae8e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ require (
77
charm.land/bubbletea/v2 v2.0.5
88
charm.land/lipgloss/v2 v2.0.3
99
github.com/charmbracelet/x/ansi v0.11.7
10-
github.com/mattn/go-runewidth v0.0.23
1110
github.com/stretchr/testify v1.7.0
1211
)
1312

@@ -22,6 +21,7 @@ require (
2221
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
2322
github.com/davecgh/go-spew v1.1.0 // indirect
2423
github.com/lucasb-eyer/go-colorful v1.4.0 // indirect
24+
github.com/mattn/go-runewidth v0.0.23 // indirect
2525
github.com/muesli/cancelreader v0.2.2 // indirect
2626
github.com/pmezard/go-difflib v1.0.0 // indirect
2727
github.com/rivo/uniseg v0.4.7 // indirect

table/view_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
tea "charm.land/bubbletea/v2"
99
"charm.land/lipgloss/v2"
10-
"github.com/mattn/go-runewidth"
10+
"github.com/charmbracelet/x/ansi"
1111
"github.com/stretchr/testify/assert"
1212
)
1313

@@ -1105,7 +1105,7 @@ func TestSimpleFlex3x3AtAllTargetWidths(t *testing.T) {
11051105
firstLine := strings.Split(rendered, "\n")[0]
11061106

11071107
assert.Equal(t, targetWidth, model.totalWidth)
1108-
assert.Equal(t, targetWidth, runewidth.StringWidth(firstLine))
1108+
assert.Equal(t, targetWidth, ansi.StringWidth(firstLine))
11091109

11101110
if t.Failed() {
11111111
return

0 commit comments

Comments
 (0)