Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix scroll jitter by ignoring autoscroll events if following
Thorsten Ball030b20ace93a
diff --git a/crates/editor/src/items.rs b/crates/editor/src/items.rsindex 36a48b29378..11ea07ff5c8 100644--- a/crates/editor/src/items.rs+++ b/crates/editor/src/items.rs@@ -277,7 +277,7 @@ impl FollowableItem for Editor {.extend(ids.iter().map(ExcerptId::to_proto));true}- EditorEvent::ScrollPositionChanged { .. } => {+ EditorEvent::ScrollPositionChanged { autoscroll, .. } if !autoscroll => {let scroll_anchor = self.scroll_manager.anchor();update.scroll_top_anchor = Some(serialize_anchor(&scroll_anchor.anchor));update.scroll_x = scroll_anchor.offset.x;