diff options
author | axel <axel@liljencrantz.se> | 2006-01-10 03:13:59 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-01-10 03:13:59 +1000 |
commit | c45e457492306e61da99ad430b6e8fdfd552c38b (patch) | |
tree | 3437211aabbcb5312c5621c138f89d60f0334723 /wildcard.c | |
parent | fef1e1db32d8d1735fa7a3ccdd595d34cd97392f (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.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 ); } |