summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-09-03 17:52:40 +0100
committerPeter Stephenson <pws@zsh.org>2015-09-03 17:52:40 +0100
commit32f5d3d8c16b4f3a11fa39c0ee378d72336ba853 (patch)
treed3cca4c81753d5fd43b18326e3490705be3875e4 /Src
parent1ba2fac03d611ca2955e1c019c9cc9189fd2920b (diff)
downloadzsh-32f5d3d8c16b4f3a11fa39c0ee378d72336ba853.tar.gz
zsh-32f5d3d8c16b4f3a11fa39c0ee378d72336ba853.tar.xz
zsh-32f5d3d8c16b4f3a11fa39c0ee378d72336ba853.zip
36416: ^C in getzlequery() just aborts query.
Also logical but possibly invisible fix for error propagated
back from listing interface.
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_refresh.c3
-rw-r--r--Src/Zle/zle_utils.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index 78046fb7b..0c28c0a2d 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -1761,7 +1761,8 @@ singlelineout:
 	inlist = 1;
 	listmatches();
 	inlist = 0;
-	zrefresh();
+	if (!errflag)
+	    zrefresh();
     }
     if (showinglist == -1)
 	showinglist = nlnct;
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c
index d1d320613..9751f7a1f 100644
--- a/Src/Zle/zle_utils.c
+++ b/Src/Zle/zle_utils.c
@@ -1183,6 +1183,11 @@ getzlequery(void)
 
     /* get a character from the tty and interpret it */
     c = getfullchar(0);
+    /*
+     * We'll interpret an interruption here as only interrupting the
+     * query, not the line editor.
+     */
+    errflag &= ~ERRFLAG_INT;
     if (c == ZWC('\t'))
 	c = ZWC('y');
     else if (ZC_icntrl(c) || c == ZLEEOF)