1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-03 08:11:03 +02:00

26025: prefer handling user input to zle -F file descriptor

This commit is contained in:
Peter Stephenson 2008-11-11 18:25:44 +00:00
parent 0e8d56723a
commit a1958f3c41
2 changed files with 20 additions and 8 deletions

View file

@ -1,3 +1,8 @@
2008-11-11 Peter Stephenson <pws@csr.com>
* 26025: Src/Zle/zle_main.c: prefer handling user input to
file installed with zle -F.
2008-11-11 Clint Adams <clint@zsh.org>
* 26023: Completion/Unix/Command/_topgit: skeletal completion for

View file

@ -585,7 +585,7 @@ raw_getbyte(long do_keytmout, char *cptr)
fds[i+1].events = POLLIN;
}
# endif
do {
for (;;) {
# ifdef HAVE_POLL
int poll_timeout;
@ -694,6 +694,19 @@ raw_getbyte(long do_keytmout, char *cptr)
/* If error or unhandled timeout, give up. */
if (selret < 0)
break;
/*
* If there's user input handle it straight away.
* This improves the user's ability to handle exceptional
* conditions like runaway output.
*/
if (
# ifdef HAVE_POLL
(fds[0].revents & POLLIN)
# else
FD_ISSET(SHTTY, &foofd)
# endif
)
break;
if (nwatch && !errtry) {
/*
* Copy the details of the watch fds in case the
@ -755,13 +768,7 @@ raw_getbyte(long do_keytmout, char *cptr)
zfree(lwatch_fds, lnwatch*sizeof(int));
freearray(lwatch_funcs);
}
} while (!
# ifdef HAVE_POLL
(fds[0].revents & POLLIN)
# else
FD_ISSET(SHTTY, &foofd)
# endif
);
}
# ifdef HAVE_POLL
zfree(fds, sizeof(struct pollfd) * nfds);
# endif