Fix jetbrains keymap alt-enter to do search::SelectAllMatches (#11951)

The default keymap uses alt-enter for `SelectAllMatches` for `context:
BufferSearchBar`.

Jetbrains keymap uses alt-enter for `ToggleCodeActions` for `context:
Editor`.

When focusing on search bar, currently alt-enter does not perform
`SelectAllMatches`, whereas `ToggleCodeActions` is triggered instead,
because search bar's text input element has `context: Editor
mode=single_line`.

This PR restricts `ToggleCodeActions` to `Editor (full mode)` context to
allow `SelectAllMatches` to be triggered for alt-enter when the search
bar is active.

Release Notes:

- Fixed alt-enter with JetBrains keymap ignoring `search::SelectAllMatches` in certain contexts ([11840](https://github.com/zed-industries/zed/issues/11840))
This commit is contained in:
Congyu 2024-05-24 17:47:38 +08:00 committed by GitHub
parent d116f3c292
commit b0d89d6f34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -53,7 +53,6 @@
"cmd-alt-b": "editor::GoToDefinitionSplit",
"cmd-shift-b": "editor::GoToTypeDefinition",
"cmd-alt-shift-b": "editor::GoToTypeDefinitionSplit",
"alt-enter": "editor::ToggleCodeActions",
"f2": "editor::GoToDiagnostic",
"cmd-f2": "editor::GoToPrevDiagnostic",
"ctrl-alt-shift-down": "editor::GoToHunk",
@ -70,7 +69,8 @@
"cmd-f12": "outline::Toggle",
"cmd-7": "outline::Toggle",
"cmd-shift-o": "file_finder::Toggle",
"cmd-l": "go_to_line::Toggle"
"cmd-l": "go_to_line::Toggle",
"alt-enter": "editor::ToggleCodeActions"
}
},
{