summaryrefslogtreecommitdiff
path: root/Src/hist.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-09-10 16:02:27 +0100
committerPeter Stephenson <pws@zsh.org>2015-09-10 16:02:27 +0100
commit86229fdf09e2c69576000b0f83edb35148096452 (patch)
tree08b0e0d41420875bce3eabb61f55943d5235f45f /Src/hist.c
parentca9fdda4088c7e6ff8cccdf59bbe770fe8e739da (diff)
downloadzsh-86229fdf09e2c69576000b0f83edb35148096452.tar.gz
zsh-86229fdf09e2c69576000b0f83edb35148096452.zip
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.
Diffstat (limited to 'Src/hist.c')
-rw-r--r--Src/hist.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 75e809c48..9c42d85c9 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -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. */