Add ability to bind to pane::RevealInProjectPanel (#7487)

Previously it wasn't possible to create a keybinding for this action
because it required an argument.

Now the action takes the active item of the pane and if it's a
multi-buffer the first one.

This also adds a default keybinding for Vim mode: `-` will reveal the
file in the project panel.

Fixes #7485.

Release Notes:

- Added `pane::RevealInProjectPanel` as an action in the command
palette. ([#7485](https://github.com/zed-industries/zed/issues/7485)).

Co-authored-by: Antonio <antonio@zed.dev>
This commit is contained in:
Thorsten Ball 2024-02-07 12:50:22 +01:00 committed by GitHub
parent 2aa8ccd6b1
commit db39b9dadc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 10 deletions

View file

@ -284,7 +284,8 @@
"ctrl-w o": "workspace::CloseInactiveTabsAndPanes",
"ctrl-w ctrl-o": "workspace::CloseInactiveTabsAndPanes",
"ctrl-w n": ["workspace::NewFileInDirection", "Up"],
"ctrl-w ctrl-n": ["workspace::NewFileInDirection", "Up"]
"ctrl-w ctrl-n": ["workspace::NewFileInDirection", "Up"],
"-": "pane::RevealInProjectPanel"
}
},
{