From 963043760fdda262131532a724f0d6b1606888d5 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 13 Mar 2000 10:23:38 +0000 Subject: zsh-workers/10107 --- Src/Zle/compmatch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Src/Zle/compmatch.c') 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; -- cgit 1.4.1