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

[bug] grid.pos can become out of bounds after a save_cursor->resize->restore_cursor sequence #13

Open
ethanpailes opened this issue Oct 10, 2023 · 0 comments

Comments

@ethanpailes
Copy link

The Grid struct can become malformed if a save_cursor (decsc) control code is issued when a terminal is large and the cursor is along the bottom or right of the screen, then the terminal is resized to a smaller size, and finally a restore_cursor (decrc) control code is issued. I've fixed this in my fork, and it would be nice to upstream the patch if possible (or address the issue in some other way).

My fix was to just clamp the position to the current edges of the screen if needed on restore.

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

No branches or pull requests

1 participant