From 2e1c0ec48370313e483d6952cbc839658c1890df Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Thu, 8 Jun 2000 07:20:31 +0000 Subject: make C-code expansion add a space only when more than one word was generated (11814) --- Src/Zle/zle_tricky.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Src/Zle') diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index fcbe9404c..11f86ba92 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -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(); -- cgit 1.4.1