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

Initialize tty before reading choices #85

Merged
merged 3 commits into from
Jun 18, 2018
Merged

Initialize tty before reading choices #85

merged 3 commits into from
Jun 18, 2018

Conversation

jhawthorn
Copy link
Owner

It's possible for user input to arrive while fzy was still reading choices from stdin. Previously, this would happen before the correct termios were set, causing fzy to misinterpret Enter as Ctrl-J for example.

Fixes #81

It's possible for user input to arrive while fzy was still reading
choices from stdin. Previously, this would happen before the correct
termios were set, causing fzy to misinterpret Enter as Ctrl-J for
example.

Fixes #81
Previously we deferred reading choices to after initializing the tty.
This makes sense only when stdin and our tty aren't the same.
@neuschaefer
Copy link
Contributor

This does indeed work, as far as I can see, and it looks much cleaner than my approach. Thanks!
Feel free to merge this solution.

@jhawthorn jhawthorn merged commit 98edd5f into master Jun 18, 2018
@jhawthorn jhawthorn deleted the fast_tty_init branch September 22, 2018 21:13
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