diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-06-27 13:18:38 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-06-27 13:18:38 +0000 |
commit | 51503a87a20d766bbf7b1228716a863f3564512d (patch) | |
tree | d8a3b2caab98a68d61ea7467ac05916fb030bba5 /Src | |
parent | b275190ff41ce261d9ec8bf6d984191252a1320f (diff) | |
download | zsh-51503a87a20d766bbf7b1228716a863f3564512d.tar.gz zsh-51503a87a20d766bbf7b1228716a863f3564512d.tar.xz zsh-51503a87a20d766bbf7b1228716a863f3564512d.zip |
(only the patch to compmatch.c from the mail); improve merging cline lists coming from different IPREFIX/PREFIX combinations and such by avoiding to generate cline structs for empty parts after a match spec anchor cline struct (15123)
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/compmatch.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c index 8e8a7ae7f..974f2ab3c 100644 --- a/Src/Zle/compmatch.c +++ b/Src/Zle/compmatch.c @@ -1178,14 +1178,18 @@ bld_parts(char *str, int len, int plen, Cline *lp) } /* This is the cline struct for the remaining string at the end. */ - *q = n = get_cline(NULL, 0, NULL, 0, NULL, 0, (plen <= 0 ? CLF_NEW : 0)); if (p != str) { int olen = str - p, llen = (op < 0 ? 0 : op); + *q = n = get_cline(NULL, 0, NULL, 0, NULL, 0, (plen <= 0 ? CLF_NEW : 0)); + if (llen > olen) llen = olen; n->prefix = get_cline(NULL, llen, p, olen, NULL, 0, 0); } + else if (!ret) + *q = n = get_cline(NULL, 0, NULL, 0, NULL, 0, (plen <= 0 ? CLF_NEW : 0)); + n->next = NULL; if (lp) |