charmbracelet / bubbles

TUI components for Bubble Tea 🫧
MIT License
5.24k stars 247 forks source link

table printing breaks in narrow windows #511

Closed bashbunni closed 3 months ago

bashbunni commented 3 months ago

Describe the bug The formatting breaks and the table gets printed multiple times when resizing to a small terminal window. It doesn't correct itself when resized again to a larger window.

Setup Please complete the following information along with version numbers, if applicable.

To Reproduce Steps to reproduce the behavior:

  1. Go to the table or table-resize examples in the Bubble Tea repo
  2. go run .
  3. resize window to be very narrow, then widen the terminal window again.

Screenshots Very narrow window: image

After widening the window: image

bashbunni commented 3 months ago

Actually this seems to be an issue with Bubble Tea itself 🤔 Experiencing the same behaviour in the spinner example. image

bashbunni commented 3 months ago

Ah seems this is already being tracked in https://github.com/charmbracelet/bubbletea/issues/717. Will close this one then