mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-03 17:44:30 +00:00
Fix scroll jitter by ignoring autoscroll events if following
When following someone else we saw jitter because `ScrollPositionChanged` events were battling `SelectionsChanged` events, both of which were scrolling the viewport. This ignores the ScrollPositionChanged if autoscrolling is on. Co-authored-by: Antonio <antonio@zed.dev> Co-authored-by: Julia <julia@zed.dev>
This commit is contained in:
parent
a802bb284c
commit
030b20ace9
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue