From 4a39b5d9c5e21d100a778e94f6c2936528967210 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 15 Jan 2001 10:44:14 +0000 Subject: two more fixes for completion matching and reporting interesting positions (13349) --- Src/Zle/compmatch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Src/Zle/compmatch.c') diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c index 4a4c1c90e..e5aafdfcc 100644 --- a/Src/Zle/compmatch.c +++ b/Src/Zle/compmatch.c @@ -1133,16 +1133,16 @@ bld_parts(char *str, int len, int plen, Cline *lp) Cmlist ms; Cmatcher mp; int t, op = plen; - char *p = str; + char *p = str, *os = str; while (len) { for (t = 0, ms = bmatchers; ms && !t; ms = ms->next) { mp = ms->matcher; - if (mp && mp->flags == CMF_RIGHT && mp->wlen < 0 && - !mp->llen && len >= mp->ralen + mp->lalen && mp->ralen && + if (mp && mp->flags == CMF_RIGHT && mp->wlen < 0 && mp->ralen && + !mp->llen && len >= mp->ralen && (str - os) >= mp->lalen && pattern_match(mp->right, str, NULL, NULL) && (!mp->lalen || - ((str - p) >= mp->lalen && + ((str - os) >= mp->lalen && pattern_match(mp->left, str - mp->lalen, NULL, NULL)))) { int olen = str - p, llen; -- cgit 1.4.1