mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 07:52:19 +03:00
Don't autoscroll the project panel when worktree changes
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
5fb112ac4c
commit
fef0bdf6c3
@ -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>) {
|
||||
|
Loading…
Reference in New Issue
Block a user