Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
terminal: Spawn terminal process on main thread on macos again (#42411)
Lukas Wirth1a807a7a6a65
diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rsindex 4f6f0e75ee6..c635cb9b417 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<usize>,- is_ssh_terminal: bool,+ is_remote_terminal: bool,window_id: u64,completion_tx: Option<Sender<Option<ExitStatus>>>,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<TaskState>,vi_mode_enabled: bool,- is_ssh_terminal: bool,+ is_remote_terminal: bool,last_mouse_move_time: Instant,last_hyperlink_search_position: Option<Point<Pixels>>,#[cfg(windows)]@@ -1959,7 +1959,7 @@ impl Terminal {}pub fn working_directory(&self) -> Option<PathBuf> {- 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,