Replicate fractional component of leader's scroll position
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
880eaa268b
commit
8699dd9c56
3 changed files with 26 additions and 13 deletions
|
@ -1039,10 +1039,15 @@ impl Editor {
|
|||
cx.notify();
|
||||
}
|
||||
|
||||
fn set_scroll_top_anchor(&mut self, anchor: Anchor, local: bool, cx: &mut ViewContext<Self>) {
|
||||
self.scroll_position = Vector2F::zero();
|
||||
fn set_scroll_top_anchor(
|
||||
&mut self,
|
||||
anchor: Anchor,
|
||||
position: Vector2F,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) {
|
||||
self.scroll_top_anchor = anchor;
|
||||
cx.emit(Event::ScrollPositionChanged { local });
|
||||
self.scroll_position = position;
|
||||
cx.emit(Event::ScrollPositionChanged { local: false });
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue