diff --git a/header.go b/header.go index fa83a93..0dc7995 100644 --- a/header.go +++ b/header.go @@ -164,7 +164,7 @@ func (h *header) SendIsTerminalSizeEnough(isEnough bool) { func (h *header) calculateTitleLength() { var titleLen int for _, hdr := range h.headers { - titleLen += len(hdr.title) + titleLen += len([]rune(hdr.title)) titleLen += h.properties.leftTabPadding + h.properties.rightTabPadding titleLen += 2 // for the border between titles } diff --git a/widget.go b/widget.go index 63c59e0..1690fd6 100644 --- a/widget.go +++ b/widget.go @@ -223,7 +223,7 @@ func (w *widget) Update(msg tea.Msg) (*widget, tea.Cmd) { func (w *widget) calculateWidgetLength() { var widgetLen int for _, widget := range w.widgets { - widgetLen += len(widget.Value) + widgetLen += len([]rune(widget.Value)) widgetLen += w.properties.leftTabPadding + w.properties.rightTabPadding widgetLen += 2 // for the border between widgets }