about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-02 16:51:14 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-02 16:51:14 +0000
commit5162807ec7496ce3eb33ccfbb5f0228cb5ab841d (patch)
tree4b9d5c1a4875d92f034ea2b737982106da3340ed
parent0aa38e11342938794d7376a380821cc198041049 (diff)
downloadzsh-5162807ec7496ce3eb33ccfbb5f0228cb5ab841d.tar.gz
zsh-5162807ec7496ce3eb33ccfbb5f0228cb5ab841d.tar.xz
zsh-5162807ec7496ce3eb33ccfbb5f0228cb5ab841d.zip
zsh-workers:7346
-rw-r--r--Src/Zle/zle_tricky.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index bbc8e2f1e..a9a9b9196 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -2871,7 +2871,8 @@ join_strs(int la, char *sa, int lb, char *sb)
 			    *ap += mp->wlen; *alp -= mp->wlen;
 			    *bp += bl; *blp -= bl;
 			    t = 1;
-			}
+			} else
+			    t = 0;
 		    }
 		}
 	    }
@@ -3422,6 +3423,11 @@ join_clines(Cline o, Cline n)
 	    }
 	    /* Now see if they have matching anchors. If not, cut the list. */
 	    if (!(o->flags & CLF_MID) && !cmp_anchors(o, n, 1)) {
+#if 0
+		/* This used to search forward for matching anchors.
+		 * Unfortunately this does the wrong thing if the prefixes
+		 * before the differing anchors match nicely. */
+
 		Cline t, tn;
 
 		for (t = n; (tn = t->next) && !cmp_anchors(o, tn, 1); t = tn);
@@ -3430,6 +3436,7 @@ join_clines(Cline o, Cline n)
 		    n = tn;
 		    continue;
 		} else {
+#endif
 		    if (o->flags & CLF_SUF)
 			break;
 
@@ -3438,7 +3445,9 @@ join_clines(Cline o, Cline n)
 		    free_cline(o->next);
 		    o->next = NULL;
 		    o->flags |= CLF_MISS;
+#if 0
 		}
+#endif
 	    }
 	    /* Ok, they are equal, now join the sub-lists. */
 	    if (o->flags & CLF_MID)