summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--Completion/Base/Core/_main_complete2
-rw-r--r--Src/Modules/zselect.c2
-rw-r--r--Src/Zle/complist.c12
4 files changed, 17 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 94cb172b2..284029883 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-10-29 Barton E. Schaefer <schaefer@zsh.org>
+
+ * 33566: Jun T.: Src/Modules/zselect.c: quash compiler warning
+
+ * 33563: Completion/Base/Core/_main_complete, Src/Zle/complist.c:
+ fix thinko in status message for INT/QUIT signals; check errflag
+ in output loops so that unexpectedly long completion listings can
+ be interrupted
+
2014-10-29 Oliver Kiddle <opk@zsh.org>
* 33528: Src/Zle/iwidgets.list, Src/Zle/zle_vi.c,
diff --git a/Completion/Base/Core/_main_complete b/Completion/Base/Core/_main_complete
index e881ea6a1..fcd63664e 100644
--- a/Completion/Base/Core/_main_complete
+++ b/Completion/Base/Core/_main_complete
@@ -128,7 +128,7 @@ _completer_num=1
# We assume localtraps to be in effect here ...
integer SECONDS=0
-trap 'zle -M "Killed by signal in ${funcstack[0]} after ${SECONDS}s";
+trap 'zle -M "Killed by signal in ${funcstack[1]} after ${SECONDS}s";
zle -R; return 130' INT QUIT
# Call the pre-functions.
diff --git a/Src/Modules/zselect.c b/Src/Modules/zselect.c
index c02074646..30a3f51a5 100644
--- a/Src/Modules/zselect.c
+++ b/Src/Modules/zselect.c
@@ -251,7 +251,7 @@ bin_zselect(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
outptr = outdata = (char **)zalloc((fdcount+1)*sizeof(char *));
while (nonempty(fdlist))
*outptr++ = getlinknode(fdlist);
- *outptr = '\0';
+ *outptr = NULL;
/* and store in array parameter */
if (outhash)
sethparam(outhash, outdata);
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 5e5ba9f20..2e1a5273c 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -1375,7 +1375,7 @@ compprintlist(int showall)
tcout(TCCLEAREOD);
g = ((lasttype && lastg) ? lastg : amatches);
- while (g) {
+ while (g && !errflag) {
char **pp = g->ylist;
#ifdef ZSH_HEAP_DEBUG
@@ -1389,7 +1389,7 @@ compprintlist(int showall)
ml = lastml;
lastused = 1;
}
- while (*e) {
+ while (*e && !errflag) {
if (((*e)->count || (*e)->always) &&
(!listdat.onlyexpl ||
(listdat.onlyexpl & ((*e)->always > 0 ? 2 : 1)))) {
@@ -1469,11 +1469,11 @@ compprintlist(int showall)
nl = nc = g->lins;
- while (n && nl--) {
+ while (n && nl-- && !errflag) {
i = g->cols;
mc = 0;
pq = pp;
- while (n && i--) {
+ while (n && i-- && !errflag) {
if (pq - g->ylist >= g->lcount)
break;
if (compzputs(*pq, mscroll))
@@ -1582,7 +1582,7 @@ compprintlist(int showall)
} else
p = skipnolist(g->matches, showall);
- while (n && nl--) {
+ while (n && nl-- && !errflag) {
if (!lasttype && ml >= mlbeg) {
lasttype = 3;
lastg = g;
@@ -1596,7 +1596,7 @@ compprintlist(int showall)
i = g->cols;
mc = 0;
q = p;
- while (n && i--) {
+ while (n && i-- && !errflag) {
wid = (g->widths ? g->widths[mc] : g->width);
if (!(m = *q)) {
if (clprintm(g, NULL, mc, ml, (!i), wid))