summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--Src/Zle/zle_refresh.c3
-rw-r--r--Src/Zle/zle_utils.c5
3 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index bf10cbdac..f9822b9c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-09-03 Peter Stephenson <p.stephenson@samsung.com>
+
+ * 36416: Src/Zle/zle_refresh.c, Src/Zle/zle_utils.c: If
+ keyboard interrupt during getzlequery(), don't propagate further,
+ just redraw the line. Also handle logical error that we
+ attempted to redware the line partially if an error or interrupt
+ was propagated.
+
2015-09-03 Daniel Shahaf <d.s@daniel.shahaf.name>
* 36403: Src/hashtable.c Test/A02alias.ztst: type -w +=
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)