From 47bdf9f026f40f5abeeac65cc6c3d95509f1ba5f Mon Sep 17 00:00:00 2001 From: "zed-zippy[bot]" <234243425+zed-zippy[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 11:57:24 +0100 Subject: [PATCH] terminal: Spawn terminal process on main thread on macos again (#42411) (cherry-pick to preview) (#42413) Cherry-pick of #42411 to preview ---- Closes https://github.com/zed-industries/zed/issues/42365, follow up to https://github.com/zed-industries/zed/pull/42234 Release Notes: - N/A *or* Added/Fixed/Improved ... Co-authored-by: Lukas Wirth --- crates/terminal/src/terminal.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs index 6ec5cd9ab8d6231c4a62549142901beb02a660c0..722b6ba948c61d9f80b5980a44305da03c1e1de3 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -387,7 +387,7 @@ impl TerminalBuilder { selection_phase: SelectionPhase::Ended, hyperlink_regex_searches: RegexSearches::new(), vi_mode_enabled: false, - is_ssh_terminal: false, + is_remote_terminal: false, last_mouse_move_time: Instant::now(), last_hyperlink_search_position: None, #[cfg(windows)] @@ -419,7 +419,7 @@ impl TerminalBuilder { cursor_shape: CursorShape, alternate_scroll: AlternateScroll, max_scroll_history_lines: Option, - is_ssh_terminal: bool, + is_remote_terminal: bool, window_id: u64, completion_tx: Option>>, cx: &App, @@ -605,7 +605,7 @@ impl TerminalBuilder { selection_phase: SelectionPhase::Ended, hyperlink_regex_searches: RegexSearches::new(), vi_mode_enabled: false, - is_ssh_terminal, + is_remote_terminal, last_mouse_move_time: Instant::now(), last_hyperlink_search_position: None, #[cfg(windows)] @@ -650,7 +650,7 @@ impl TerminalBuilder { }) }; // the thread we spawn things on has an effect on signal handling - if cfg!(target_os = "unix") { + if !cfg!(target_os = "windows") { cx.spawn(async move |_| fut.await) } else { cx.background_spawn(fut) @@ -832,7 +832,7 @@ pub struct Terminal { hyperlink_regex_searches: RegexSearches, task: Option, vi_mode_enabled: bool, - is_ssh_terminal: bool, + is_remote_terminal: bool, last_mouse_move_time: Instant, last_hyperlink_search_position: Option>, #[cfg(windows)] @@ -1963,7 +1963,7 @@ impl Terminal { } pub fn working_directory(&self) -> Option { - if self.is_ssh_terminal { + if self.is_remote_terminal { // We can't yet reliably detect the working directory of a shell on the // SSH host. Until we can do that, it doesn't make sense to display // the working directory on the client and persist that. @@ -2162,7 +2162,7 @@ impl Terminal { self.template.cursor_shape, self.template.alternate_scroll, self.template.max_scroll_history_lines, - self.is_ssh_terminal, + self.is_remote_terminal, self.template.window_id, None, cx,