summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-06-27 13:18:38 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-06-27 13:18:38 +0000
commit51503a87a20d766bbf7b1228716a863f3564512d (patch)
treed8a3b2caab98a68d61ea7467ac05916fb030bba5
parentb275190ff41ce261d9ec8bf6d984191252a1320f (diff)
downloadzsh-51503a87a20d766bbf7b1228716a863f3564512d.tar.gz
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)
-rw-r--r--ChangeLog6
-rw-r--r--Src/Zle/compmatch.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 81ec146c7..87a8363dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2001-06-27 Sven Wischnowsky <wischnow@zsh.org>
+ * 15123: Src/Zle/compmatch.c: (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
+
* 15115: Doc/Zsh/builtins.yo, Doc/Zsh/options.yo, Src/exec.c,
Src/jobs.c, Src/options.c, Src/zsh.h: add autocontinue option
to automatically make stopped jos running when they are being
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)