From cd38cd40f7f81bee21c14157fc45540d538965bd Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 29 May 2000 12:42:59 +0000 Subject: matching bugs with patterns with two anchors (11634) --- Src/Zle/compmatch.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Src/Zle/compmatch.c') diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c index 33b5b8a40..60a2fe7b9 100644 --- a/Src/Zle/compmatch.c +++ b/Src/Zle/compmatch.c @@ -473,7 +473,7 @@ match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp, bp = bp->next; } /*** This once was: `while (ll && lw)', but then ignored characters at - * the end or not, well, ignored. */ + * the end were not, well, ignored. */ while (ll) { /* Hm, we unconditionally first tried the matchers for the cases @@ -1859,8 +1859,10 @@ join_clines(Cline o, Cline n) if (!(o->flags & CLF_NEW) && (n->flags & CLF_NEW)) { Cline t, tn; - for (t = n; (tn = t->next) && (tn->flags & CLF_NEW); t = tn); - if (tn && cmp_anchors(o, tn, 0)) { + for (t = n; (tn = t->next) && + ((tn->flags & CLF_NEW) || !cmp_anchors(o, tn, 0)); + t = tn); + if (tn) { diff = sub_join(o, n, tn, 0); #if 0 -- cgit 1.4.1