Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Avoid scrolling to the new cursor position so the assistant's output is stable
Nathan Sobo83fc7b9b7c77
diff --git a/crates/ai/src/assistant.rs b/crates/ai/src/assistant.rsindex dde527d89cf..7631381273a 100644--- a/crates/ai/src/assistant.rs+++ b/crates/ai/src/assistant.rs@@ -1681,6 +1681,8 @@ impl ConversationEditor {|selections| selections.select_ranges(new_selections),);});+ // Avoid scrolling to the new cursor position so the assistant's output is stable.+ cx.defer(|this, _| this.scroll_position = None);}}