about summary refs log tree commit diff
path: root/Src/Zle/compmatch.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-29 12:42:59 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-29 12:42:59 +0000
commitcd38cd40f7f81bee21c14157fc45540d538965bd (patch)
tree4bbc9d4d36187365d498ee632d9715cc0316a110 /Src/Zle/compmatch.c
parentd22ee9a5ba4fcedc63b63a0ab904b86471fcad56 (diff)
downloadzsh-cd38cd40f7f81bee21c14157fc45540d538965bd.tar.gz
zsh-cd38cd40f7f81bee21c14157fc45540d538965bd.tar.xz
zsh-cd38cd40f7f81bee21c14157fc45540d538965bd.zip
matching bugs with patterns with two anchors (11634)
Diffstat (limited to 'Src/Zle/compmatch.c')
-rw-r--r--Src/Zle/compmatch.c8
1 files changed, 5 insertions, 3 deletions
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