Fix completion menu jumping (#22780)
Co-Authored-By: Thorsten <thorsten@zed.dev> Release Notes: - Fix selected suggestion updating too many times when Zeta triggers Co-authored-by: Thorsten <thorsten@zed.dev>
This commit is contained in:
parent
0b361e5b7c
commit
dffdf99228
1 changed files with 3 additions and 3 deletions
|
@ -334,6 +334,9 @@ impl CompletionsMenu {
|
|||
entries
|
||||
}
|
||||
_ => {
|
||||
if self.selected_item != 0 {
|
||||
self.selected_item += 1;
|
||||
}
|
||||
let mut entries = Vec::with_capacity(self.entries.len() + 1);
|
||||
entries.push(hint);
|
||||
entries.extend_from_slice(&self.entries);
|
||||
|
@ -341,9 +344,6 @@ impl CompletionsMenu {
|
|||
}
|
||||
}
|
||||
.into();
|
||||
if self.selected_item != 0 && self.selected_item + 1 < self.entries.len() {
|
||||
self.selected_item += 1;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn resolve_visible_completions(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue