Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
terminal: Fix pty info change detection race (#57257)
Ben Brandt43b7ca9cc24f
diff --git a/crates/terminal/src/pty_info.rs b/crates/terminal/src/pty_info.rsindex 4e16d69e405..96908479afe 100644--- a/crates/terminal/src/pty_info.rs+++ b/crates/terminal/src/pty_info.rs@@ -192,8 +192,9 @@ impl PtyProcessInfo {}let this = self.clone();let has_changed = cx.background_executor().spawn(async move {+ let previous = this.current.read().clone();let current = this.load();- let has_changed = match (this.current.read().as_ref(), current.as_ref()) {+ let has_changed = match (previous.as_ref(), current.as_ref()) {(None, None) => false,(Some(prev), Some(now)) => prev.cwd != now.cwd || prev.name != now.name,_ => true,