diff options
Diffstat (limited to 'Src/Zle/compcore.c')
-rw-r--r-- | Src/Zle/compcore.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index d4051bda0..ae3a64074 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -327,9 +327,7 @@ do_completion(UNUSED(Hookdef dummy), Compldat dat) haspattern = 0; complistmax = getiparam("LISTMAX"); zsfree(complastprompt); - complastprompt = ztrdup(((isset(ALWAYSLASTPROMPT) && zmult == 1) || - (unset(ALWAYSLASTPROMPT) && zmult != 1)) ? - "yes" : ""); + complastprompt = ztrdup(isset(ALWAYSLASTPROMPT) ? "yes" : ""); dolastprompt = 1; zsfree(complist); complist = ztrdup(isset(LISTROWSFIRST) ? @@ -975,7 +973,7 @@ makecomplist(char *s, int incmd, int lst) mnum = 0; unambig_mnum = -1; isuf = NULL; - insmnum = 1; + insmnum = zmult; #if 0 /* group-numbers in compstate[insert] */ insgnum = 1; @@ -2051,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); @@ -2536,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); |