From 0aa38e11342938794d7376a380821cc198041049 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 2 Aug 1999 16:50:50 +0000 Subject: zsh-workers:7345 --- Src/Zle/zle_tricky.c | 8 ++++++-- 1 file 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. */ -- cgit 1.4.1