Skip to content

Commit

Permalink
Workaround for bubbles viewport wrapping text based on bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
cskeeters committed Feb 25, 2025
1 parent 3436b31 commit 785edbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 785edbb

Please sign in to comment.