From 785edbbab090ac1207ca9e3a7a50deb5723965f3 Mon Sep 17 00:00:00 2001 From: Chad Skeeters Date: Tue, 25 Feb 2025 14:09:14 -0600 Subject: [PATCH] Workaround for bubbles viewport wrapping text based on bytes charmbracelet/bubbles#742 --- operations.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operations.go b/operations.go index e694332..60bd82e 100644 --- a/operations.go +++ b/operations.go @@ -129,13 +129,13 @@ func (m *model) handleResize(msg tea.WindowSizeMsg) { // we can initialize the viewport. The initial dimensions come in // quickly, though asynchronously, which is why we wait for them // here. - m.viewport = viewport.New(msg.Width, m.viewportHeight) + m.viewport = viewport.New(msg.Width*3, m.viewportHeight) m.viewport.YPosition = headerHeight m.viewport.SetContent("") m.firstResize = true } else { - m.viewport.Width = msg.Width + m.viewport.Width = msg.Width*3 m.viewport.Height = msg.Height - verticalMarginHeight } m.viewport.SetContent(m.generateContent())