xonecas.io
60255
Zn

Zoea-Nova / commit 875670e

fix(tui): correct viewport.Width calculation for consistency

- Update viewport.Width to subtract 2 for scrollbar (was -1)
- Align with panelContentWidth calculation
- Improve comment clarity: space + char = 2 chars total

xonecas2026-02-05 875670ee53815442c0bf2b2a6ef5d4b98303ff0e parent 22cc77f

1 file changed

internal/tui/app.go+1−1
@@ -128,7 +128,7 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
128128 if vpHeight < 5 {
129129 vpHeight = 5
130130 }
131- m.viewport.Width = msg.Width - 6 - 1 // -6 for existing padding, -1 for scrollbar
131+ m.viewport.Width = msg.Width - 6 - 2 // -6 for panel padding, -2 for scrollbar (space + char)
132132 m.viewport.Height = vpHeight
133133
134134 // Re-render content if in focus view