From 51503a87a20d766bbf7b1228716a863f3564512d Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Wed, 27 Jun 2001 13:18:38 +0000 Subject: (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) --- ChangeLog | 6 ++++++ Src/Zle/compmatch.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 81ec146c7..87a8363dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2001-06-27 Sven Wischnowsky + * 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) -- cgit 1.4.1