diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-22 22:32:20 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-22 22:32:20 +0000 |
commit | bdecf74ef12452e2123ce66e42bc66aa81347b30 (patch) | |
tree | baed9a8aa756cfb2b6548986632dd3248ac6d539 /Src/Zle/zle_tricky.c | |
parent | 9acc1dd713d95c0e894b4eee86f524888753f8a3 (diff) | |
download | zsh-bdecf74ef12452e2123ce66e42bc66aa81347b30.tar.gz zsh-bdecf74ef12452e2123ce66e42bc66aa81347b30.tar.xz zsh-bdecf74ef12452e2123ce66e42bc66aa81347b30.zip |
zsh-workers/8004
Diffstat (limited to 'Src/Zle/zle_tricky.c')
-rw-r--r-- | Src/Zle/zle_tricky.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index 2984b836f..43cb2fe9f 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -7192,8 +7192,19 @@ static int matchcmp(Cmatch *a, Cmatch *b) { if ((*a)->disp) { - if ((*b)->disp) - return strcmp((*a)->disp, (*b)->disp); + if ((*b)->disp) { + if ((*a)->flags & CMF_DISPLINE) { + if ((*b)->flags & CMF_DISPLINE) + return strcmp((*a)->disp, (*b)->disp); + else + return -1; + } else { + if ((*b)->flags & CMF_DISPLINE) + return 1; + else + return strcmp((*a)->disp, (*b)->disp); + } + } return -1; } if ((*b)->disp) @@ -7264,7 +7275,7 @@ makearray(LinkList l, int type, int flags, int *np, int *nlp, int *llp) qsort((void *) rp, n, sizeof(Cmatch), (int (*) _((const void *, const void *)))matchcmp); - if (!(flags & (CGF_UNIQALL | CGF_UNIQCON))) { + if (!(flags & CGF_UNIQCON)) { /* And delete the ones that occur more than once. */ for (ap = cp = rp; *ap; ap++) { *cp++ = *ap; |