From 1a807a7a6a6568385402cf2cca1b43fce66a94fa Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Tue, 11 Nov 2025 08:57:30 +0100 Subject: [PATCH] terminal: Spawn terminal process on main thread on macos again (#42411) 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 ... --- 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 4f6f0e75ee6f38615a2d82d7a4ad3ee0c06c2323..c635cb9b417f422ad0ddd91611233cb04a771679 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -383,7 +383,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)] @@ -415,7 +415,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, @@ -601,7 +601,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)] @@ -646,7 +646,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) @@ -828,7 +828,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)] @@ -1959,7 +1959,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. @@ -2158,7 +2158,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,