about summary refs log tree commit diff
path: root/Src/hist.c
diff options
context:
space:
mode:
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. */