Showing the first func def in the preview window

This commit is contained in:
Strahinja Val Markovic 2012-08-05 21:13:01 -07:00
parent 55267ceb5c
commit 0da734d393
2 changed files with 7 additions and 7 deletions

View File

@ -108,19 +108,14 @@ std::vector< CompletionData > ToCompletionDataVector(
else
{
std::string possible_newline =
completions[ index ].detailed_info_.empty() ?
"" :
"\n";
// If we have already seen this completion, then this is an overload of a
// function we have seen. We add the signature of the overload to the
// detailed information.
completions[ index ].detailed_info_
.append( possible_newline )
.append( data.return_type_ )
.append( " " )
.append( data.everything_except_return_type_ );
.append( data.everything_except_return_type_ )
.append( "\n" );
}
}

View File

@ -200,6 +200,11 @@ CompletionData::CompletionData( const CXCompletionResult &completion_result )
}
kind_ = CursorKindToVimKind( completion_result.CursorKind );
detailed_info_.append( return_type_ )
.append( " " )
.append( everything_except_return_type_ )
.append( "\n" );
}
} // namespace YouCompleteMe