Perform initial file load git diff async
This commit is contained in:
parent
6825b6077a
commit
6633c0b328
3 changed files with 27 additions and 25 deletions
|
@ -449,7 +449,11 @@ impl LocalWorktree {
|
|||
let (file, contents, head_text) = this
|
||||
.update(&mut cx, |t, cx| t.as_local().unwrap().load(&path, cx))
|
||||
.await?;
|
||||
Ok(cx.add_model(|cx| Buffer::from_file(0, contents, head_text, Arc::new(file), cx)))
|
||||
Ok(cx.add_model(|cx| {
|
||||
let mut buffer = Buffer::from_file(0, contents, head_text, Arc::new(file), cx);
|
||||
buffer.update_git(cx);
|
||||
buffer
|
||||
}))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue