Don't autoscroll the project panel when worktree changes

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2021-09-30 13:44:07 -07:00
parent 5fb112ac4c
commit fef0bdf6c3

View File

@ -97,6 +97,7 @@ impl ProjectPanel {
project::Event::ActiveEntryChanged(Some((worktree_id, entry_id))) => {
this.expand_entry(*worktree_id, *entry_id, cx);
this.update_visible_entries(Some((*worktree_id, *entry_id)), cx);
this.autoscroll();
cx.notify();
}
project::Event::WorktreeRemoved(id) => {
@ -373,8 +374,6 @@ impl ProjectPanel {
}
self.visible_entries.push(visible_worktree_entries);
}
self.autoscroll();
}
fn expand_entry(&mut self, worktree_id: usize, entry_id: usize, cx: &mut ViewContext<Self>) {