about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-02 16:50:50 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-02 16:50:50 +0000
commit0aa38e11342938794d7376a380821cc198041049 (patch)
treed52db83fadada0b82c46d451d7fd68ef987cf501
parentafb8089dcd26da5a8c932db4abca6851996cd48d (diff)
downloadzsh-0aa38e11342938794d7376a380821cc198041049.tar.gz
zsh-0aa38e11342938794d7376a380821cc198041049.tar.xz
zsh-0aa38e11342938794d7376a380821cc198041049.zip
zsh-workers:7345
-rw-r--r--Src/Zle/zle_tricky.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index f73460407..bbc8e2f1e 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -2542,9 +2542,12 @@ match_str(char *l, char *w, int *bp, int *rwlp, int sfx, int test)
 	    lm = NULL;
 	} else {
 	    /* No matcher and different characters: l does not match w. */
+	    if (test)
+		return 0;
+
 	    abort_match();
 
-	    return (test ? 0 : -1);
+	    return -1;
 	}
     }
     /* If this is a recursive call, we just return if l matched w or not. */
@@ -2907,7 +2910,7 @@ cmp_anchors(Cline o, Cline n, int join)
     /* First try the exact strings. */
     if ((!(o->flags & CLF_LINE) && o->wlen == n->wlen &&
 	 (!o->word || !strncmp(o->word, n->word, o->wlen))) ||
-	(line = ((!o->line && !n->line) ||
+	(line = ((!o->line && !n->line && !o->wlen && !n->wlen) ||
 		 (o->llen == n->llen && o->line && n->line &&
 		  !strncmp(o->line, n->line, o->llen))))) {
 	if (line) {
@@ -3434,6 +3437,7 @@ join_clines(Cline o, Cline n)
 		    o->wlen = 0;
 		    free_cline(o->next);
 		    o->next = NULL;
+		    o->flags |= CLF_MISS;
 		}
 	    }
 	    /* Ok, they are equal, now join the sub-lists. */