Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Agent: Improved auto scroll location when using read-file tool (#58640)

Liigo Zhuang8807ac4f3b0c
diff --git a/crates/editor/src/items.rs b/crates/editor/src/items.rs
index 7fe643ab681..4156617ef55 100644
--- a/crates/editor/src/items.rs
+++ b/crates/editor/src/items.rs
@@ -370,7 +370,7 @@ impl FollowableItem for Editor {
};
drop(buffer);
self.set_selections_from_remote(vec![selection], None, window, cx);
- self.request_autoscroll_remotely(Autoscroll::fit(), cx);
+ self.request_autoscroll_remotely(Autoscroll::focused(), cx);
}
}