diff options
author | 2007-04-21 05:34:30 +1000 | |
---|---|---|
committer | 2007-04-21 05:34:30 +1000 | |
commit | 4d5c50cbb32506db8c4aa53ba804faf32e5015a5 (patch) | |
tree | 2a042288ce2c528e8dd011732bfa61ceb3ed3470 /wildcard.c | |
parent | 91d1dee06b166b9d434b329aa6a1d837cbaf6e32 (diff) |
Fix minor bug - the description would occasionally get appended to command specific tab completions in case insensitive mode
darcs-hash:20070420193430-ac50b-13e34ac41cf1662a74f0af329fb41d872df5d691.gz
Diffstat (limited to 'wildcard.c')
-rw-r--r-- | wildcard.c | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -256,6 +256,15 @@ static int wildcard_complete_internal( const wchar_t *orig, return 1; } + if( flags & COMPLETE_NO_CASE ) + { + out_completion = wcsdup( orig ); + } + else + { + out_completion = wcsdup( str ); + } + if( wcschr( str, PROG_COMPLETE_SEP ) ) { /* @@ -263,10 +272,10 @@ static int wildcard_complete_internal( const wchar_t *orig, */ wchar_t *sep; - out_completion = wcsdup( str ); sep = wcschr(out_completion, PROG_COMPLETE_SEP ); *sep = 0; out_desc = sep + 1; + } else { @@ -282,16 +291,6 @@ static int wildcard_complete_internal( const wchar_t *orig, out_desc = func_desc; } - /* - Append description to item, if a description exists - */ - out_completion = wcsdup( str ); - } - - if( flags & COMPLETE_NO_CASE ) - { - free( out_completion ); - out_completion = wcsdup( orig ); } if( out_completion ) @@ -1217,7 +1216,9 @@ int wildcard_expand( const wchar_t *wc, sb_destroy( &sb ); if( wc_base_ptr ) + { free( wc_base ); + } } return res; |