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

fix: restore the cursor shape when exiting the app #11983

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dreck-sallow
Copy link

These changes aim to resolve #11883.
Any feedback or suggestions for improvement are welcome :)

@@ -1202,7 +1202,11 @@ impl Application {
.backend_mut()
.show_cursor(CursorKind::Block)
.ok();
self.terminal.restore(terminal_config)

use std::io::Write;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest to move this import to the top of the file and not inside the function.

@pascalkuthe
Copy link
Member

pascalkuthe commented Nov 1, 2024

We already reset the cursor, see #10769. What is likely happening for you is that terminfo is wrong for your terminal. There is only so much we can do jn that case. Unconditionally emitting this escape sequence is what e did in the past but this doesn't work in quite a few cases. What we have now is a best effort to support as many terminals as possible. The reality is simply that there is no solution that works in all edgecases

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.

Stop changing the cursor
3 participants