Fix task terminal split (#40824)
Before: https://github.com/user-attachments/assets/efe2aeb6-94bb-46b6-944f-5a6345c072b4 After: https://github.com/user-attachments/assets/61a7f699-6b4d-465f-add1-07774068420c Release Notes: - Fixed task terminal split not working correctly
This commit is contained in:
@@ -417,6 +417,12 @@ impl Project {
|
||||
cx: &mut Context<'_, Project>,
|
||||
cwd: Option<PathBuf>,
|
||||
) -> Task<Result<Entity<Terminal>>> {
|
||||
// We cannot clone the task's terminal, as it will effectively re-spawn the task, which might not be desirable.
|
||||
// For now, create a new shell instead.
|
||||
if terminal.read(cx).task().is_some() {
|
||||
return self.create_terminal_shell(cwd, cx);
|
||||
}
|
||||
|
||||
let local_path = if self.is_via_remote_server() {
|
||||
None
|
||||
} else {
|
||||
|
||||
@@ -454,7 +454,7 @@ impl TerminalBuilder {
|
||||
args: Option<Vec<String>>,
|
||||
title_override: Option<SharedString>,
|
||||
) -> Self {
|
||||
log::info!("Using {program} as shell");
|
||||
log::debug!("Using {program} as shell");
|
||||
Self {
|
||||
program,
|
||||
args,
|
||||
|
||||
Reference in New Issue
Block a user