From d6255fb3d2729c98ec1b090d7d15c1d4e3cbc355 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Wed, 12 Mar 2025 00:01:08 -0400 Subject: [PATCH] git: Prevent up and down motions leaking out of the commit editor (#26501) Closes #ISSUE Release Notes: - Git Beta: fixed an issue where pressing `up` or `down` in the git panel's commit message editor would change the selected status entry --- crates/git_ui/src/git_panel.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs index 66f7d26d2ec5bb56af4e0b934f4b8f03b200458d..d46957c59f1986efde31fbc56017783d8db22dd9 100644 --- a/crates/git_ui/src/git_panel.rs +++ b/crates/git_ui/src/git_panel.rs @@ -2825,6 +2825,12 @@ impl GitPanel { .child( div() .pr_2p5() + .on_action(|&editor::actions::MoveUp, _, cx| { + cx.stop_propagation(); + }) + .on_action(|&editor::actions::MoveDown, _, cx| { + cx.stop_propagation(); + }) .child(EditorElement::new(&self.commit_editor, panel_editor_style)), ) .child(