1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-22 03:40:47 +02:00

hide all but one match with the same string in the list even for unsorted groups (15991)

This commit is contained in:
Sven Wischnowsky 2001-10-09 09:50:12 +00:00
parent bc0f49e09b
commit dc472db5f0
2 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2001-10-09 Sven Wischnowsky <wischnow@zsh.org>
* 15991: Src/Zle/compcore.c: hide all but one match with the
same string in the list even for unsorted groups
2001-10-08 Oliver Kiddle <opk@zsh.org>
* 15987: Src/Modules/tcp.c: remove includes duplicated from tcp.h

View File

@ -2654,6 +2654,8 @@ makearray(LinkList l, int type, int flags, int *np, int *nlp, int *llp)
}
} else {
if (!(flags & CGF_UNIQALL) && !(flags & CGF_UNIQCON)) {
int dup;
for (ap = rp; *ap; ap++) {
for (bp = cp = ap + 1; *bp; bp++) {
if (!matcheq(*ap, *bp))
@ -2662,6 +2664,17 @@ makearray(LinkList l, int type, int flags, int *np, int *nlp, int *llp)
n--;
}
*cp = NULL;
if (!(*ap)->disp) {
for (dup = 0, bp = ap + 1; *bp; bp++)
if (!(*bp)->disp &&
!((*bp)->flags & CMF_MULT) &&
!strcmp((*ap)->str, (*bp)->str)) {
(*bp)->flags |= CMF_MULT;
dup = 1;
}
if (dup)
(*ap)->flags |= CMF_FMULT;
}
}
} else if (!(flags & CGF_UNIQCON)) {
int dup;