mirror of https://github.com/helix-editor/helix
Use early return in rendering completion doc
parent
93c7afc4ed
commit
8e9c329952
|
@ -381,7 +381,10 @@ impl Component for Completion {
|
|||
self.popup.render(area, surface, cx);
|
||||
|
||||
// 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:
|
||||
// option.detail
|
||||
// ---
|
||||
|
@ -481,4 +484,3 @@ impl Component for Completion {
|
|||
markdown_doc.render(area, surface, cx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue