Alt+Enter to select all matches doesn't work for JetBrains keymap
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
When searching, using alt + enter to select all matches does not work ("base_keymap": "JetBrains").
However, it works as expected for ("base_keymap": "VSCode").
https://github.com/zed-industries/zed/assets/52687642/2bee43a8-f980-4233-8e4a-29b403c9ca55
Environment
Zed: v0.135.1 (Zed Preview) OS: macOS 14.5.0 Memory: 16 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
My keymap settings is empty []
I tried to debug this with some println!():
When I press alt+enter on search bar, I get the following key matches
key match [KeyBinding { keystrokes: [Keystroke { modifiers: Modifiers { control: false, alt: true, shift: false, platform: false, function: false }, key: "enter", ime_key: None }], context_predicate: Some(Identifier("Editor")), action: "editor::ToggleCodeActions" }, KeyBinding { keystrokes: [Keystroke { modifiers: Modifiers { control: false, alt: true, shift: false, platform: false, function: false }, key: "enter", ime_key: None }], context_predicate: None, action: "picker::ConfirmInput" }]
key match [KeyBinding { keystrokes: [Keystroke { modifiers: Modifiers { control: false, alt: true, shift: false, platform: false, function: false }, key: "enter", ime_key: None }], context_predicate: Some(Identifier("BufferSearchBar")), action: "search::SelectAllMatches" }, KeyBinding { keystrokes: [Keystroke { modifiers: Modifiers { control: false, alt: true, shift: false, platform: false, function: false }, key: "enter", ime_key: None }], context_predicate: None, action: "picker::ConfirmInput" }]
key match [KeyBinding { keystrokes: [Keystroke { modifiers: Modifiers { control: false, alt: true, shift: false, platform: false, function: false }, key: "enter", ime_key: None }], context_predicate: Some(Identifier("Pane")), action: "search::SelectAllMatches" }, KeyBinding { keystrokes: [Keystroke { modifiers: Modifiers { control: false, alt: true, shift: false, platform: false, function: false }, key: "enter", ime_key: None }], context_predicate: None, action: "picker::ConfirmInput" }]
key match [KeyBinding { keystrokes: [Keystroke { modifiers: Modifiers { control: false, alt: true, shift: false, platform: false, function: false }, key: "enter", ime_key: None }], context_predicate: None, action: "picker::ConfirmInput" }]
But then, the first action is dispatched, and it is the editor context's action:
action to dispatch [Keystroke { modifiers: Modifiers { control: false, alt: true, shift: false, platform: false, function: false }, key: "enter", ime_key: None }]: dyn Action { name: "editor::ToggleCodeActions" }
However, I think since search bar is currently active, the SelectAllMatches should really be dispatched.
The Editor context seems to be higher than BufferSearchBar context in the context stack.
node_id: DispatchNodeId(1), context: os=macos Workspace
node_id: DispatchNodeId(332), context: os=macos Pane
node_id: DispatchNodeId(433), context: os=macos BufferSearchBar
node_id: DispatchNodeId(437), context: os=macos Editor mode=single_line