erikgeiser / promptkit

Go prompt library
MIT License
249 stars 21 forks source link

Workaround for partial draw and initial window resize #20

Closed nemith closed 1 year ago

nemith commented 1 year ago

When the initial tea.WindowSizeMsg message comes in there seems to be some wonkyness in how bubbletea chooses to redraw the screen.

After Init() the screen is drawn and then the WindowSizeMsg is returned asyncronously and seems to improperly update the screen with the new details. This sends a ClearScrollArea message to force redrawing the entire screen.

This is a workaround and probably isn't a proper fix (you do see a flash as the update message comes in)

Fixes: #18

erikgeiser commented 1 year ago

Sorry for the late reply. Looks good but I'll play around with it this weekend before merging. Thank you very much!

EDIT: I'll fix the CI, too.