charmbracelet / bubbletea

A powerful little TUI framework 🏗
MIT License
28.01k stars 807 forks source link

(v2) duplicated line in `split-editors` example on init #1157

Open meowgorithm opened 2 months ago

meowgorithm commented 2 months ago

This is likely on the Bubbles v2 side of things but when the split-editors example initializes the first lines in textarea are duplicated. This goes away on keypress.

Screenshot 2024-09-18 at 3 09 36 PM
aymanbagabas commented 1 month ago

I'm not able to reproduce using Kitty and Ghostty with/without Tmux :/

haoqixu commented 1 week ago

This issue occurs in v2.0.0-alpha.1 and originated from commit v2.0.0-alpha.1~24.

Before this commit, when Program was initialized with WithAltScreen(), Program.Run() would call p.render.SetMode(), which cleared the screen with ansi.EraseEntireDisplay and ansi.MoveCursorOrigin.

I believe this issue has been fixed in d727a8c on the v2-* branches.

haoqixu commented 1 week ago

I think #1159 is also caused by the same problem.

haoqixu commented 1 week ago

I think #1159 is also caused by the same problem.

cc @robinovitch61