From 437294af796f2c1530ef942f53c823ba0753556f Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 18 Oct 1999 09:46:07 +0000 Subject: zsh-workers/8313 --- Src/Zle/zle_tricky.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'Src/Zle/zle_tricky.c') diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index 70371b41c..dd11c2d28 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -4118,23 +4118,6 @@ addmatches(Cadata dat, char **argv) llpl -= pl; lpre += pl; } - if (comppatmatch && *comppatmatch) { - int is = (*comppatmatch == '*'); - char *tmp = (char *) zhalloc(2 + llpl + llsl); - - strcpy(tmp, lpre); - tmp[llpl] = 'x'; - strcpy(tmp + llpl + is, lsuf); - - tokenize(tmp); - remnulargs(tmp); - if (haswilds(tmp)) { - if (is) - tmp[llpl] = Star; - if ((cp = patcompile(tmp, 0, NULL))) - haspattern = 1; - } - } } /* Now duplicate the strings we have from the command line. */ if (dat->ipre) @@ -4196,6 +4179,23 @@ addmatches(Cadata dat, char **argv) else *argv = NULL; } + if (comppatmatch && *comppatmatch) { + int is = (*comppatmatch == '*'); + char *tmp = (char *) zhalloc(2 + llpl + llsl); + + strcpy(tmp, lpre); + tmp[llpl] = 'x'; + strcpy(tmp + llpl + is, lsuf); + + tokenize(tmp); + remnulargs(tmp); + if (haswilds(tmp)) { + if (is) + tmp[llpl] = Star; + if ((cp = patcompile(tmp, 0, NULL))) + haspattern = 1; + } + } } if (*argv) { if (dat->pre) -- cgit 1.4.1