Use early return in rendering completion doc

pull/5914/head
Gokul Soumya 2 years ago committed by Blaž Hrastnik
parent 93c7afc4ed
commit 8e9c329952

@ -381,7 +381,10 @@ impl Component for Completion {
self.popup.render(area, surface, cx); self.popup.render(area, surface, cx);
// if we have a selection, render a markdown popup on top/below with info // if we have a selection, render a markdown popup on top/below with info
if let Some(option) = self.popup.contents().selection() { let option = match self.popup.contents().selection() {
Some(option) => option,
None => return,
};
// need to render: // need to render:
// option.detail // option.detail
// --- // ---
@ -481,4 +484,3 @@ impl Component for Completion {
markdown_doc.render(area, surface, cx); markdown_doc.render(area, surface, cx);
} }
} }
}

Loading…
Cancel
Save