1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-29 15:31:28 +02:00

more careful when optimising patterns in compfiles (11981)

This commit is contained in:
Sven Wischnowsky 2000-06-19 11:43:12 +00:00
parent 083befef2b
commit 11ec14c3b3
2 changed files with 5 additions and 2 deletions

@ -1,5 +1,8 @@
2000-06-19 Sven Wischnowsky <wischnow@zsh.org>
* 11981: Src/Zle/computil.c: more careful when optimising patterns
in compfiles
* 11977: Completion/Core/_options, Completion/Core/_set_options,
Completion/Core/_unset_options, Doc/Zsh/compwid.yo,
Src/Zle/comp.h, Src/Zle/complete.c, Src/Zle/compmatch.c,

@ -3159,7 +3159,7 @@ cfp_matcher_pats(char *matcher, char *add)
if (m->wlen < 0 && !m->llen && m->ralen == 1) {
for (tmp = add, tl = al, mp = ms; tl; tl--, tmp++, mp++) {
if (pattern_match(m->right, tmp, NULL, NULL)) {
if (*mp) {
if (*mp || (tmp == add && *tmp == '.')) {
*tmp = '\0';
al = tmp - add;
break;
@ -3190,7 +3190,7 @@ cfp_matcher_pats(char *matcher, char *add)
}
}
if (*add) {
char *ret = "", buf[259];
char *ret = "", buf[259], *oadd = add;
for (mp = ms; *add; add++, mp++) {
if (!(m = *mp)) {