summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/compcore.c4
-rw-r--r--Src/Zle/complete.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index ba538ca99..ae3a64074 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -2049,7 +2049,7 @@ addmatches(Cadata dat, char **argv)
     Heap oldheap;
 
     SWITCHHEAPS(oldheap, compheap) {
-        if (dat->dummies)
+        if (dat->dummies >= 0)
             dat->aflags = ((dat->aflags | CAF_NOSORT | CAF_UNIQCON) &
                            ~CAF_UNIQALL);
 
@@ -2534,7 +2534,7 @@ addmatches(Cadata dat, char **argv)
             addmatch("<all>", dat->flags | CMF_ALL, &disp, 1);
 	    hasallmatch = 1;
 	}
-        while (dat->dummies--)
+        while (dat->dummies-- > 0)
             addmatch("", dat->flags | CMF_DUMMY, &disp, 0);
 
     } SWITCHBACKHEAPS(oldheap);
diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c
index 471c9f491..30173927d 100644
--- a/Src/Zle/complete.c
+++ b/Src/Zle/complete.c
@@ -540,7 +540,7 @@ bin_compadd(char *name, char **argv, UNUSED(Options ops), UNUSED(int func))
     dat.match = NULL;
     dat.flags = 0;
     dat.aflags = CAF_MATCH;
-    dat.dummies = 0;
+    dat.dummies = -1;
 
     for (; *argv && **argv ==  '-'; argv++) {
 	if (!(*argv)[1]) {