diff options
author | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-01-20 22:20:31 +0530 |
---|---|---|
committer | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-01-20 22:20:31 +0530 |
commit | 062e423125bd29b3cae7ba045fca22bd2df3b1cd (patch) | |
tree | 9dc3d9c06b629f6ef55de029f4cfcd47e1f1e1fd /wildcard.cpp | |
parent | 0c99fc5b4dcf4f202ae47ccd8d4d380791e17bff (diff) |
Fixed more known auto completion bugs; auto completion calls working fine now
Diffstat (limited to 'wildcard.cpp')
-rw-r--r-- | wildcard.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/wildcard.cpp b/wildcard.cpp index 115f9045..1d250176 100644 --- a/wildcard.cpp +++ b/wildcard.cpp @@ -250,12 +250,7 @@ static int wildcard_complete_internal( const wchar_t *orig, { wchar_t *out_completion = 0; const wchar_t *out_desc = desc; - - if( out.empty() ) - { - return 1; - } - + if( flags & COMPLETE_NO_CASE ) { out_completion = wcsdup( orig ); @@ -319,7 +314,7 @@ static int wildcard_complete_internal( const wchar_t *orig, do { res |= wildcard_complete_internal( orig, str, wc+1, 0, desc, desc_func, out, flags ); - if( res && out.empty() ) + if( res ) break; } while( *str++ != 0 ); @@ -1190,7 +1185,7 @@ int wildcard_expand( const wchar_t *wc, if( c.flags & COMPLETE_NO_CASE ) { sb_clear( &sb ); - sb_printf( &sb, L"%ls%ls%ls", base_dir, wc_base, c.completion ); + sb_printf( &sb, L"%ls%ls%ls", base_dir, wc_base, c.completion.c_str() ); c.completion = (wchar_t *)sb.buff; } |