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
Exiting fullscreen glitch when also removing a line in output #1013
Labels
Comments
Additionally, reversing the condition leaves more lines in the terminal after toggling the full screen. For example: if !m.isFullscreen {
s += "yay we're fullscreen\n"
} keeps leftover lines in the terminal |
Oof, wow, this is definitely a bug. Appreciate the report—we'll look into this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When conditionally rendering a line if you're full screen, then when you exit full screen it clears too many lines and removes terminal output that isn't part of
Setup
Please complete the following information along with version numbers, if applicable.
To Reproduce
Steps to reproduce the behavior:
go run .
Source Code
Expected behavior
When exiting full screen mode, tea renders the view first before trying to figure out how many lines to clear.
Screenshots
When first just running the program:
After clicking f to enter fullscreen:
Then clicking f again to exit:
Doing that again, clicking f twice, results in another line removed:
Double clicking again:
And again:
Additional context
As a more real-life example, in my real program I have all the normal output, but then conditionally a status bar at the end.
When toggling fullscreen it will add a status line to my program saying "forcing fullscreen". Then if there are no other status messages, when I get out of full screen then the status line should also disappear, leading to the bug/glitch explained in this issue.
The text was updated successfully, but these errors were encountered: