Improve outline panel keyboard navigation (#20385)
Closes https://github.com/zed-industries/zed/issues/20187 Make outline panel more eager to open its entries: * scroll editor to selected outline entries (before it required an extra `"outline_panel::Open", { "change_selection": false }` action call) * make any `Open` action call to behave like `"outline_panel::Open", { "change_selection": true }` and remove the redundant parameter. Now opening an entry is equal to double clicking the same entry: the editor gets scrolled and its selection changes * add a way to open entries the same way as excerpts are open in multi buffers (will open the entire file, scroll and place the caret) * additionally, fix another race issue that caused wrong entry to be revealed after the selection change Release Notes: - Improved outline panel keyboard navigation
This commit is contained in:
@@ -567,9 +567,11 @@
|
||||
"ctrl-alt-c": "outline_panel::CopyPath",
|
||||
"alt-ctrl-shift-c": "outline_panel::CopyRelativePath",
|
||||
"alt-ctrl-r": "outline_panel::RevealInFileManager",
|
||||
"space": ["outline_panel::Open", { "change_selection": false }],
|
||||
"space": "outline_panel::Open",
|
||||
"shift-down": "menu::SelectNext",
|
||||
"shift-up": "menu::SelectPrev"
|
||||
"shift-up": "menu::SelectPrev",
|
||||
"alt-enter": "editor::OpenExcerpts",
|
||||
"ctrl-k enter": "editor::OpenExcerptsSplit"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user