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: 🐛 Fix scroll in terminals on Windows #156

Merged
merged 1 commit into from
Aug 22, 2023
Merged

fix: 🐛 Fix scroll in terminals on Windows #156

merged 1 commit into from
Aug 22, 2023

Conversation

Adham-A
Copy link
Contributor

@Adham-A Adham-A commented Aug 21, 2023

@Canop
Copy link
Owner

Canop commented Aug 22, 2023

When you enable mouse capture in a program, you must disable it on end, or the terminal ends in a bad state.

Similar modifications are done then removed in cli.rs (look at w.queue(cursor::Hide)?; and w.queue(cursor::Show)?;). That's where you must move mouse enabling and disabling (and use queue, not execute, as for others).

@Adham-A
Copy link
Contributor Author

Adham-A commented Aug 22, 2023

I now enable and disable in cli.rs,
I added #[cfg(windows)] in enabling and disabling, as well as in imports, since it showed unused warnings on Linux,

Something else to change/refactor ?

@Canop
Copy link
Owner

Canop commented Aug 22, 2023

Something else to change/refactor ?

Nothing that I see right now. If you tested it seriously on Windows I'll take it from here.

@Adham-A
Copy link
Contributor Author

Adham-A commented Aug 22, 2023

For information: I tested on Windows 10

@Canop Canop merged commit ead2e05 into Canop:main Aug 22, 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.

2 participants