diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-03-13 10:23:38 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-03-13 10:23:38 +0000 |
commit | 963043760fdda262131532a724f0d6b1606888d5 (patch) | |
tree | 510f1b4279360935b988a8b071ed0f3aa1451586 /Src/Zle/compmatch.c | |
parent | 16ea1f357d02481efa55d5304ab8f452e37ca6b4 (diff) | |
download | zsh-963043760fdda262131532a724f0d6b1606888d5.tar.gz zsh-963043760fdda262131532a724f0d6b1606888d5.tar.xz zsh-963043760fdda262131532a724f0d6b1606888d5.zip |
zsh-workers/10107
Diffstat (limited to 'Src/Zle/compmatch.c')
-rw-r--r-- | Src/Zle/compmatch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c index 8dc6527c8..e4babe628 100644 --- a/Src/Zle/compmatch.c +++ b/Src/Zle/compmatch.c @@ -75,7 +75,7 @@ add_bmatchers(Cmatcher m) for (; m; m = m->next) { if ((!m->flags && m->wlen > 0 && m->llen > 0) || - (m->flags == CMF_RIGHT && m->wlen == -1 && !m->llen)) { + (m->flags == CMF_RIGHT && m->wlen < 0 && !m->llen)) { *q = n = (Cmlist) zhalloc(sizeof(struct cmlist)); n->matcher = m; q = &(n->next); @@ -546,7 +546,7 @@ match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp, } else t = match_str(l + llen + moff, tp + moff, NULL, 0, NULL, 0, 1, part); - if (t || !both) + if (t || (mp->wlen == -1 && !both)) break; } } @@ -1008,7 +1008,7 @@ bld_parts(char *str, int len, int plen, Cline *lp) while (len) { for (t = 0, ms = bmatchers; ms && !t; ms = ms->next) { mp = ms->matcher; - if (mp && mp->flags == CMF_RIGHT && mp->wlen == -1 && + if (mp && mp->flags == CMF_RIGHT && mp->wlen < 0 && !mp->llen && len >= mp->ralen && mp->ralen && pattern_match(mp->right, str, NULL, NULL)) { int olen = str - p, llen; |