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:
Kirill Bulatov
2025-10-21 21:08:56 +00:00
committed by GitHub
parent e49edfac74
commit 256fe6e45c
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -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 {
+1 -1
View File
@@ -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,