Avoid breaking follow when syncing leader's scroll position
Co-authored-by: Mikayla Maki <mikayla@zed.dev> Co-authored-by: Kay Simmons <kay@zed.dev>
This commit is contained in:
parent
82397f34d1
commit
9ef00ea44c
3 changed files with 32 additions and 7 deletions
|
@ -284,17 +284,17 @@ impl Editor {
|
|||
}
|
||||
|
||||
pub fn set_scroll_anchor(&mut self, scroll_anchor: ScrollAnchor, cx: &mut ViewContext<Self>) {
|
||||
self.set_scroll_anchor_internal(scroll_anchor, true, cx);
|
||||
hide_hover(self, cx);
|
||||
self.scroll_manager.set_anchor(scroll_anchor, true, cx);
|
||||
}
|
||||
|
||||
pub(crate) fn set_scroll_anchor_internal(
|
||||
pub(crate) fn set_scroll_anchor_remote(
|
||||
&mut self,
|
||||
scroll_anchor: ScrollAnchor,
|
||||
local: bool,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) {
|
||||
hide_hover(self, cx);
|
||||
self.scroll_manager.set_anchor(scroll_anchor, local, cx);
|
||||
self.scroll_manager.set_anchor(scroll_anchor, false, cx);
|
||||
}
|
||||
|
||||
pub fn scroll_screen(&mut self, amount: &ScrollAmount, cx: &mut ViewContext<Self>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue