From 083befef2bfe9a93dbf6a6acfe2faed7f743d6ed Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 19 Jun 2000 10:48:21 +0000 Subject: new match spec characters bBeE, match only word/line not both (11977) --- Src/Zle/compmatch.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Src/Zle/compmatch.c') diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c index 130cb23b0..aa7890407 100644 --- a/Src/Zle/compmatch.c +++ b/Src/Zle/compmatch.c @@ -565,7 +565,9 @@ match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp, NULL, NULL)) || !match_parts(l + aoff, w + aoff, alen, part)))) continue; - } else if (!both || il || iw) + } else if (!both || ((mp->flags & CMF_INTER) ? + ((mp->flags & CMF_LINE) ? iw : il) : + (il || iw))) continue; /* Fine, now we call ourselves recursively to find the @@ -734,7 +736,9 @@ match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp, tw - mp->lalen - mp->ralen, NULL, NULL)); else - t = (!sfx && !il && !iw); + t = (!sfx && !((mp->flags & CMF_INTER) ? + ((mp->flags & CMF_LINE) ? iw : il) : + (il || iw))); } if (mp->flags & CMF_RIGHT) { /* Try to match the right anchor, if any. */ @@ -753,7 +757,9 @@ match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp, mp->ralen - mp->lalen, NULL, NULL)); else - t = (sfx && !il && !iw); + t = (sfx && !((mp->flags & CMF_INTER) ? + ((mp->flags & CMF_LINE) ? iw : il) : + (il || iw))); } /* Now try to match the line and word patterns. */ if (!t || -- cgit 1.4.1