AMythicDev / minus

An asynchronous, runtime data feedable terminal paging library for Rust
https://crates.io/crates/minus/
Apache License 2.0
320 stars 23 forks source link

Investigate screen flickering on WSL/Windows Terminal #121

Closed AMythicDev closed 10 months ago

AMythicDev commented 10 months ago

@EiEddie can you test your code from this branch?. It will print out the events on the screen before handling them on the screen. This will help us investigate all the events that the event reader is reading.

EiEddie commented 10 months ago

I test using the new code, and find it always print

[src/core/init.rs:329] inp = Ignore

when I moving my mouse.

Further, I found that everything I do that can make program to get an Ignore event, like press a useless key, would cause the screen to flicker. Flickering when mouse moving is because moving of mouse produce tons of Ignore event, and make program incessant flashing.

AMythicDev commented 10 months ago

Can you check if the latest commit fixed the problem?

EiEddie commented 10 months ago

Yes! Perfect, it does not flicker anymore.

AMythicDev commented 10 months ago

The solution I pushed now is hacky. It will get cleaned up when I merge #119. Anyways I am merging this.

AMythicDev commented 10 months ago

Merged. Thanks @EiEddie for all your help.

AMythicDev commented 10 months ago

@EiEddie I have pushed a patch release containing these changes. You can get it from crates.io.