Actually display the correct completion's doc

This commit is contained in:
Julia 2023-09-05 22:23:16 -04:00
parent e802c072f7
commit 1584dae9c2

View file

@ -1050,7 +1050,8 @@ impl CompletionsMenu {
Flex::row() Flex::row()
.with_child(list) .with_child(list)
.with_children({ .with_children({
let completion = &self.completions[selected_item]; let mat = &self.matches[selected_item];
let completion = &self.completions[mat.candidate_id];
let documentation = &completion.lsp_completion.documentation; let documentation = &completion.lsp_completion.documentation;
if let Some(lsp::Documentation::MarkupContent(content)) = documentation { if let Some(lsp::Documentation::MarkupContent(content)) = documentation {