Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for partial draw and initial window resize #20

Merged
merged 1 commit into from
Jun 6, 2023
Merged

Workaround for partial draw and initial window resize #20

merged 1 commit into from
Jun 6, 2023

Conversation

nemith
Copy link
Contributor

@nemith nemith commented Jun 2, 2023

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
Copy link
Owner

erikgeiser commented Jun 6, 2023

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.

Copy link
Owner

@erikgeiser erikgeiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, it works great. Thanks!

@erikgeiser erikgeiser merged commit daa7019 into erikgeiser:main Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Init page of paged choices are in a weird order
2 participants