Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix completions menu scroll when `y_flipped` and edit prediction arrives (#23580)
Michael Sloan6e9ea4784980
diff --git a/crates/editor/src/code_context_menus.rs b/crates/editor/src/code_context_menus.rsindex 5dede722030..7238fc65fe7 100644--- a/crates/editor/src/code_context_menus.rs+++ b/crates/editor/src/code_context_menus.rs@@ -871,8 +871,9 @@ impl CompletionsMenu {};entries.extend(matches.into_iter().map(CompletionEntry::Match));self.selected_item = new_selection;- self.scroll_handle- .scroll_to_item(new_selection, ScrollStrategy::Top);+ // Scroll to 0 even if the LSP completion is the only one selected. This keeps the display+ // consistent when y_flipped.+ self.scroll_handle.scroll_to_item(0, ScrollStrategy::Top);}}