Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix PageUp for context menu (#13593)

Aleksei Gusev6e1b99b03935
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index 18289a98519..7ca6af8008b 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -6812,6 +6812,16 @@ impl Editor {
return;
}
+ if self
+ .context_menu
+ .write()
+ .as_mut()
+ .map(|menu| menu.select_first(self.project.as_ref(), cx))
+ .unwrap_or(false)
+ {
+ return;
+ }
+
if matches!(self.mode, EditorMode::SingleLine { .. }) {
cx.propagate();
return;