diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-08 10:26:20 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-08 10:26:20 +0000 |
commit | f9a6f521d6475360bee03808ced1f301983bb700 (patch) | |
tree | 6e01b5b9e8b01ca160c211e88a6a451967f39e5d /Src/Zle/compresult.c | |
parent | 623351671b7437dee08763bbdf9d2e8e6505e347 (diff) | |
download | zsh-f9a6f521d6475360bee03808ced1f301983bb700.tar.gz zsh-f9a6f521d6475360bee03808ced1f301983bb700.tar.xz zsh-f9a6f521d6475360bee03808ced1f301983bb700.zip |
zsh-workers/8588
Diffstat (limited to 'Src/Zle/compresult.c')
-rw-r--r-- | Src/Zle/compresult.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c index 5b807684e..b3c8bdd4f 100644 --- a/Src/Zle/compresult.c +++ b/Src/Zle/compresult.c @@ -33,11 +33,6 @@ #undef GLOBAL_PROTOTYPES #include "compresult.pro" -/* Convenience macro for calling bslashquote() (formerly quotename()). * - * This uses the instring variable above. */ - -#define quotename(s, e) bslashquote(s, e, instring) - #define inststr(X) inststrlen((X),1,-1) /* This cuts the cline list before the stuff that isn't worth @@ -857,11 +852,13 @@ do_single(Cmatch m) /* If we didn't add a suffix, add a space, unless we are * * doing menu completion or we are completing files and * * the string doesn't name an existing file. */ - if (m->autoq && (!m->isuf || m->isuf[0] != m->autoq)) { - inststrlen(&(m->autoq), 1, 1); - minfo.insc++; + if (m->autoq && (!m->isuf || !strpfx(m->autoq, m->isuf))) { + int al = strlen(m->autoq); + inststrlen(m->autoq, 1, al); + minfo.insc += al; } - if (!menucmp && (usemenu != 3 || insspace)) { + if (!menucmp && !(m->flags & CMF_NOSPACE) && + (usemenu != 3 || insspace)) { inststrlen(" ", 1, 1); minfo.insc++; if (minfo.we) |