summaryrefslogtreecommitdiff
path: root/Src/Zle/compmatch.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-01-15 10:44:14 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-01-15 10:44:14 +0000
commit4a39b5d9c5e21d100a778e94f6c2936528967210 (patch)
treeb6592eb905f31ecfdceb32f6ec935a8d345a1556 /Src/Zle/compmatch.c
parent25900ecf28bb9da7fe5b3878f40e83388404f146 (diff)
downloadzsh-4a39b5d9c5e21d100a778e94f6c2936528967210.tar.gz
zsh-4a39b5d9c5e21d100a778e94f6c2936528967210.zip
two more fixes for completion matching and reporting interesting positions (13349)
Diffstat (limited to 'Src/Zle/compmatch.c')
-rw-r--r--Src/Zle/compmatch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c
index 4a4c1c90e..e5aafdfcc 100644
--- a/Src/Zle/compmatch.c
+++ b/Src/Zle/compmatch.c
@@ -1133,16 +1133,16 @@ bld_parts(char *str, int len, int plen, Cline *lp)
Cmlist ms;
Cmatcher mp;
int t, op = plen;
- char *p = str;
+ char *p = str, *os = str;
while (len) {
for (t = 0, ms = bmatchers; ms && !t; ms = ms->next) {
mp = ms->matcher;
- if (mp && mp->flags == CMF_RIGHT && mp->wlen < 0 &&
- !mp->llen && len >= mp->ralen + mp->lalen && mp->ralen &&
+ if (mp && mp->flags == CMF_RIGHT && mp->wlen < 0 && mp->ralen &&
+ !mp->llen && len >= mp->ralen && (str - os) >= mp->lalen &&
pattern_match(mp->right, str, NULL, NULL) &&
(!mp->lalen ||
- ((str - p) >= mp->lalen &&
+ ((str - os) >= mp->lalen &&
pattern_match(mp->left, str - mp->lalen, NULL, NULL)))) {
int olen = str - p, llen;