-
Notifications
You must be signed in to change notification settings - Fork 179
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
Replace termion with crossterm #296
Conversation
Is this ready for testing @jtschuster? |
@cantino Sorry for the delay, it should be ready to look at now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get
$ thread 'main' panicked at 'McFly error: failed to read input IoError(Custom { kind: Other, error: "Failed to initialize input reader" })', src/interface.rs:413:43
git st note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace 2h 11m
On my Mac when I run this.
It looks like there is a known issue with crossterm on mac when /dev/tty is used instead of stdin. Since it looks like zsh's zle uses the tty, that seems to be causing issues. It's working for me on linux with bash and zsh, and mac with bash, but not zsh. |
I've also just set the crossterm dependency to reference the in-progress pr crossterm-rs/crossterm#711 instead of the released version and it seems to work in zsh on mac now (at least doesn't panic). |
@cantino Sorry for letting this get stale, but it should be ready to take another look at now. The crashing on zsh issue was fixed in crossterm v0.26, and it seems to be working for me. Please take a look when you can. |
Thank you for your hard work on this @jtschuster. Have you been using this personally without issue? I've tested on fish, zsh, and bash on my mac and zsh on Ubuntu. Seems to work great! Minor: The highlight color is a bit hard to read on my Mac on iTerm2: Is now a good time to allow color customization? |
I use windows primarily, but I've been using #280 without issues so far, and haven't hit issues testing this branch yet.
I just pushed a commit that changes the highlight color to DarkGreen and it's much more readable.
I wouldn't want to add too much to this PR, but it should be easy to rebase #156 once this is in. |
Good catch! I've pushed a commit that makes it match the behavior in master. |
Thanks for the or @jtschuster, i’m going to test this out locally tomorrow. For now would you find fixing the last clippy warnings? |
@jtschuster @cantino I've been using this branch, its been good edit: please run cargo fmt |
One more merge and I think we're good to go on this. |
Thanks @jtschuster! Awesome work. |
Released in v0.8.0. |
This isolates the changes from #280 that are related to crossterm.
@cantino Hopefully this makes it easier to review and test yourself, and PowerShell/Windows support can be added separately.