aboutsummaryrefslogtreecommitdiffhomepage
path: root/wildcard.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-01-10 03:13:59 +1000
committerGravatar axel <axel@liljencrantz.se>2006-01-10 03:13:59 +1000
commitc45e457492306e61da99ad430b6e8fdfd552c38b (patch)
tree3437211aabbcb5312c5621c138f89d60f0334723 /wildcard.c
parentfef1e1db32d8d1735fa7a3ccdd595d34cd97392f (diff)
Makecompletion functions work with completion descriptions regardless of if they contain a separator character or not
darcs-hash:20060109171359-ac50b-d3fc75cb3263d1f20296e5e81a9f48caf345cd01.gz
Diffstat (limited to 'wildcard.c')
-rw-r--r--wildcard.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/wildcard.c b/wildcard.c
index 651dd370..c008d3ab 100644
--- a/wildcard.c
+++ b/wildcard.c
@@ -163,7 +163,15 @@ static int wildcard_complete_internal( const wchar_t *orig,
Append generic description to item, if the description exists
*/
if( desc && wcslen(desc) )
- new = wcsdupcat2( str, desc, (void *)0 );
+ {
+ /*
+ Check if the description already contains a separator character, if not, prepend it
+ */
+ if( wcschr( desc, COMPLETE_SEP ) )
+ new = wcsdupcat2( str, desc, (void *)0 );
+ else
+ new = wcsdupcat2( str, COMPLETE_SEP_STR, desc, (void *)0 );
+ }
else
new = wcsdup( str );
}