Makecompletion functions work with completion descriptions regardless of if they contain a separator character or not

darcs-hash:20060109171359-ac50b-d3fc75cb3263d1f20296e5e81a9f48caf345cd01.gz
This commit is contained in:
axel 2006-01-10 03:13:59 +10:00
parent fef1e1db32
commit c45e457492

View file

@ -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) )
{
/*
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 );
}