mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-05 10:20:51 +00:00
Fix panic when trying to show completions but none match the query
This commit is contained in:
parent
85e6ea1091
commit
1375c7b7e4
1 changed files with 3 additions and 1 deletions
|
@ -1711,7 +1711,9 @@ impl Editor {
|
|||
}
|
||||
|
||||
pub fn has_completions(&self) -> bool {
|
||||
self.completion_state.is_some()
|
||||
self.completion_state
|
||||
.as_ref()
|
||||
.map_or(false, |c| !c.matches.is_empty())
|
||||
}
|
||||
|
||||
pub fn render_completions(&self, cx: &AppContext) -> Option<ElementBox> {
|
||||
|
|
Loading…
Reference in a new issue