Samyak2 / toipe

yet another typing test, but crab flavoured
MIT License
595 stars 31 forks source link

Handle terminal resize gracefully #49

Open Samyak2 opened 1 year ago

Samyak2 commented 1 year ago

What?

When the terminal is resized in the middle of a typing test, the text wraps around weirdly. A ctrl-r fixes this but it would be nice to not interrupt the test.

Although, a terminal resize in the middle of a test might be unlikely.

How?

Termion, the library toipe uses for terminal rendering, doesn't seem to have an event for resizes: https://gitlab.redox-os.org/redox-os/termion/-/issues/151

So this will be tricky to implement. I'm not sure how to do this yet