fzy

terminal fuzzy finder picker

git clone https://9o.is/git/fzy.git

commit 0ab3e1e0dec724768709640e4e13ec4eaf59437f
parent dbdd93afea2b6bb42f6ae17c511b33a59bee63dd
Author: John Hawthorn <john@hawthorn.email>
Date:   Sat, 15 Sep 2018 14:12:14 -0700

Return 0 on pselect EINTR

Diffstat:
Msrc/tty.c | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/tty.c b/src/tty.c @@ -96,8 +96,13 @@ int tty_input_ready(tty_t *tty, unsigned long timeout) { struct timespec ts = {timeout / 1000, (timeout % 1000) * 1000000}; - pselect(tty->fdin + 1, &readfs, NULL, NULL, &ts, NULL); - return FD_ISSET(tty->fdin, &readfs); + int err = pselect(tty->fdin + 1, &readfs, NULL, NULL, &ts, NULL); + + if (err < 0) { + return 0; + } else { + return FD_ISSET(tty->fdin, &readfs); + } } static void tty_sgr(tty_t *tty, int code) {