Add OpenExcerptsSplit (#8574)

I would like to keep diagnostics open on one side, and process them on
the other.


Release Notes:

- Added `editor::OpenExcerptsSplit` (bound to `cmd-k enter`) to open the
selected excerpts in the adjacent pane
- vim: Added `ctrl-w d`, `ctrl-w shift-d` and `ctrl-w space` for
`editor::GoTo{,Type}Definition` and `editor::OpenExcerptsSplit`
This commit is contained in:
Conrad Irwin 2024-02-28 19:23:36 -07:00 committed by GitHub
parent b7429bf29d
commit 778b6fb27b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 100 additions and 80 deletions

View file

@ -127,13 +127,14 @@ impl PickerDelegate for ProjectSymbolsDelegate {
let position = buffer
.read(cx)
.clip_point_utf16(symbol.range.start, Bias::Left);
let editor = if secondary {
workspace.split_project_item::<Editor>(buffer, cx)
let pane = if secondary {
workspace.adjacent_pane(cx)
} else {
workspace.open_project_item::<Editor>(buffer, cx)
workspace.active_pane().clone()
};
let editor = workspace.open_project_item::<Editor>(pane, buffer, cx);
editor.update(cx, |editor, cx| {
editor.change_selections(Some(Autoscroll::center()), cx, |s| {
s.select_ranges([position..position])