Expand dirs on-demand when opening buffers inside unloaded dirs
This commit is contained in:
parent
cd823ede4d
commit
3e6aedfc69
3 changed files with 206 additions and 74 deletions
|
@ -5413,7 +5413,10 @@ impl Project {
|
|||
if self.is_local() {
|
||||
let worktree = self.worktree_for_id(worktree_id, cx)?;
|
||||
worktree.update(cx, |worktree, cx| {
|
||||
worktree.as_local_mut().unwrap().expand_dir(entry_id, cx);
|
||||
worktree
|
||||
.as_local_mut()
|
||||
.unwrap()
|
||||
.expand_entry_for_id(entry_id, cx);
|
||||
});
|
||||
} else if let Some(project_id) = self.remote_id() {
|
||||
cx.background()
|
||||
|
@ -5739,7 +5742,10 @@ impl Project {
|
|||
.read_with(&cx, |this, cx| this.worktree_for_entry(entry_id, cx))
|
||||
.ok_or_else(|| anyhow!("invalid request"))?;
|
||||
worktree.update(&mut cx, |worktree, cx| {
|
||||
worktree.as_local_mut().unwrap().expand_dir(entry_id, cx)
|
||||
worktree
|
||||
.as_local_mut()
|
||||
.unwrap()
|
||||
.expand_entry_for_id(entry_id, cx)
|
||||
});
|
||||
Ok(proto::Ack {})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue