Add the ability for tasks to target the center pane (#22004)
Closes #20060 Closes #20720 Closes #19873 Closes #9445 Release Notes: - Fixed a bug where tasks would be spawned with their working directory set to a file in some cases - Added the ability to spawn tasks in the center pane, when spawning from a keybinding: ```json5 [ { // Assuming you have a task labeled "echo hello" "ctrl--": [ "task::Spawn", { "task_name": "echo hello", "target": "center" } ] } ] ```
This commit is contained in:
parent
85c3aec6e7
commit
4f96706161
18 changed files with 263 additions and 106 deletions
|
@ -68,7 +68,7 @@ impl TasksModalDelegate {
|
|||
};
|
||||
Some((
|
||||
source_kind,
|
||||
new_oneshot.resolve_task(&id_base, &self.task_context)?,
|
||||
new_oneshot.resolve_task(&id_base, Default::default(), &self.task_context)?,
|
||||
))
|
||||
}
|
||||
|
||||
|
@ -684,6 +684,7 @@ mod tests {
|
|||
|
||||
cx.dispatch_action(Spawn {
|
||||
task_name: Some("example task".to_string()),
|
||||
target: None,
|
||||
});
|
||||
let tasks_picker = workspace.update(cx, |workspace, cx| {
|
||||
workspace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue