mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 10:21:46 +02:00
make C-code expansion add a space only when more than one word was generated (11814)
This commit is contained in:
parent
f3c138aee7
commit
2e1c0ec483
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2000-06-08 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 11814: Src/Zle/zle_tricky.c: make C-code expansion add a space
|
||||
only when more than one word was generated
|
||||
|
||||
2000-06-08 Tanaka Akira <akr@zsh.org>
|
||||
|
||||
* users/3130: Completion/Debian/_apt: fix actions for _alternative.
|
||||
|
|
|
@ -1627,7 +1627,7 @@ inststrlen(char *str, int move, int len)
|
|||
static int
|
||||
doexpansion(char *s, int lst, int olst, int explincmd)
|
||||
{
|
||||
int ret = 1;
|
||||
int ret = 1, first = 1;
|
||||
LinkList vl;
|
||||
char *ss;
|
||||
|
||||
|
@ -1678,10 +1678,11 @@ doexpansion(char *s, int lst, int olst, int explincmd)
|
|||
if (olst != COMP_EXPAND_COMPLETE || nonempty(vl) ||
|
||||
(cs && line[cs-1] != '/')) {
|
||||
#endif
|
||||
if (nonempty(vl)) {
|
||||
if (nonempty(vl) || !first) {
|
||||
spaceinline(1);
|
||||
line[cs++] = ' ';
|
||||
}
|
||||
first = 0;
|
||||
}
|
||||
end:
|
||||
popheap();
|
||||
|
|
Loading…
Reference in a new issue