Reuse Confirm action in chat panel, go-to-line, and project search

This commit is contained in:
Max Brunsfeld 2022-04-21 15:24:05 -07:00
parent 915ba91888
commit 490b65b55f
4 changed files with 25 additions and 33 deletions

View file

@ -1,7 +1,6 @@
[
// Standard macOS bindings
{
"context": "menu",
"bindings": {
"up": "menu::SelectPrev",
"ctrl-p": "menu::SelectPrev",
@ -11,11 +10,7 @@
"cmd-down": "menu::SelectLast",
"enter": "menu::Confirm",
"escape": "menu::Cancel",
"ctrl-c": "menu::Cancel"
}
},
{
"bindings": {
"ctrl-c": "menu::Cancel",
"shift-cmd-{": "pane::ActivatePrevItem",
"shift-cmd-}": "pane::ActivateNextItem",
"cmd-w": "pane::CloseActiveItem",
@ -287,6 +282,12 @@
"cmd-f10": "editor::RestartLanguageServer"
}
},
{
"context": "ProjectSearchBar",
"bindings": {
"cmd-enter": "project_search::SearchInNew"
}
},
{
"context": "Workspace",
"bindings": {
@ -317,13 +318,6 @@
},
// Bindings that should be unified with other bindings
// for more general actions
{
"context": "ProjectSearchBar",
"bindings": {
"enter": "project_search::Search",
"cmd-enter": "project_search::SearchInNew"
}
},
{
"context": "Editor && renaming",
"bindings": {
@ -342,18 +336,5 @@
"bindings": {
"enter": "editor::ConfirmCodeAction"
}
},
{
"context": "GoToLine",
"bindings": {
"escape": "go_to_line::Toggle",
"enter": "go_to_line::Confirm"
}
},
{
"context": "ChatPanel",
"bindings": {
"enter": "chat_panel::Send"
}
}
]