Fix FilterAndSortCandidates behavior

FilterAndSortCandidates(completions, 'word', '') should
return a dict, not a list.
This commit is contained in:
Stanislav Golovanov 2013-05-09 21:33:10 +04:00
parent 06b1daf1b3
commit 837a1ab889

View File

@ -65,16 +65,7 @@ boost::python::list FilterAndSortCandidates(
pylist filtered_candidates;
if ( query.empty() ) {
if ( candidate_property.empty() )
return candidates;
int num_candidates = len( candidates );
for ( int i = 0; i < num_candidates; ++i ) {
filtered_candidates.append( candidates[ i ][ candidate_property ] );
}
return filtered_candidates;
}
std::vector< const Candidate * > repository_candidates =