1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-12-29 16:25:35 +01:00

36468: Fix infinite loop exiting from Zle widget.

If the exit was while we were waiting to complete a lexical expression
we might not exit from the loop.
This commit is contained in:
Peter Stephenson 2015-09-10 16:02:27 +01:00
parent ca9fdda408
commit 86229fdf09
2 changed files with 10 additions and 0 deletions

View file

@ -1,5 +1,9 @@
2015-09-10 Peter Stephenson <p.stephenson@samsung.com>
* 36468: Src/hist.c: Infinite loop if we tried to exit from a
Zle widget but the lexer thought the current lexical expression
needed finishing.
* 36460: Test/E01options.ztst: Discard benign error on failure
to write to pipe with no one reading.

View file

@ -390,6 +390,12 @@ ihgetc(void)
{
int c = ingetc();
if (exit_pending)
{
lexstop = 1;
errflag |= ERRFLAG_ERROR;
return ' ';
}
qbang = 0;
if (!stophist && !(inbufflags & INP_ALIAS)) {
/* If necessary, expand history characters. */