From cd2d593a6c6a2b8ceff4c2d260094e31633c991d Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Mon, 12 Dec 2022 15:29:36 -0800 Subject: [PATCH] Fixed issue where the NextScreen action would never have an effect --- crates/editor/src/editor.rs | 1 - crates/editor/src/scroll/actions.rs | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index ad21622fd9..ab2bdf1889 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -184,7 +184,6 @@ actions!( Paste, Undo, Redo, - NextScreen, MoveUp, PageUp, MoveDown, diff --git a/crates/editor/src/scroll/actions.rs b/crates/editor/src/scroll/actions.rs index 8e57402532..fb3dec0129 100644 --- a/crates/editor/src/scroll/actions.rs +++ b/crates/editor/src/scroll/actions.rs @@ -64,15 +64,15 @@ impl Editor { return None; } - self.context_menu.as_mut()?; + if self.mouse_context_menu.read(cx).visible() { + return None; + } if matches!(self.mode, EditorMode::SingleLine) { cx.propagate_action(); return None; } - self.request_autoscroll(Autoscroll::Next, cx); - Some(()) }