feat(workspace): allow alternative actions to open files and symbols in split

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
Alex Viscreanu 2023-07-14 21:41:23 +02:00
parent 369ccc725c
commit c7669317ec
No known key found for this signature in database
25 changed files with 277 additions and 80 deletions

View file

@ -1021,7 +1021,7 @@ mod tests {
// Split the pane with the first entry, then open the second entry again.
workspace
.update(cx, |w, cx| {
w.split_pane(w.active_pane().clone(), SplitDirection::Right, cx);
w.split_and_clone(w.active_pane().clone(), SplitDirection::Right, cx);
w.open_path(file2.clone(), None, true, cx)
})
.await
@ -1344,7 +1344,11 @@ mod tests {
cx.dispatch_action(window_id, NewFile);
workspace
.update(cx, |workspace, cx| {
workspace.split_pane(workspace.active_pane().clone(), SplitDirection::Right, cx);
workspace.split_and_clone(
workspace.active_pane().clone(),
SplitDirection::Right,
cx,
);
workspace.open_path((worktree.read(cx).id(), "the-new-name.rs"), None, true, cx)
})
.await