mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-26 10:40:54 +00:00
Perform git diff on remote buffer open
This commit is contained in:
parent
ce7f6dd082
commit
42b7820dbb
1 changed files with 2 additions and 1 deletions
|
@ -5816,7 +5816,7 @@ impl Project {
|
||||||
cx: &mut ModelContext<Self>,
|
cx: &mut ModelContext<Self>,
|
||||||
) -> Task<Result<ModelHandle<Buffer>>> {
|
) -> Task<Result<ModelHandle<Buffer>>> {
|
||||||
let mut opened_buffer_rx = self.opened_buffer.1.clone();
|
let mut opened_buffer_rx = self.opened_buffer.1.clone();
|
||||||
cx.spawn(|this, cx| async move {
|
cx.spawn(|this, mut cx| async move {
|
||||||
let buffer = loop {
|
let buffer = loop {
|
||||||
let buffer = this.read_with(&cx, |this, cx| {
|
let buffer = this.read_with(&cx, |this, cx| {
|
||||||
this.opened_buffers
|
this.opened_buffers
|
||||||
|
@ -5834,6 +5834,7 @@ impl Project {
|
||||||
.await
|
.await
|
||||||
.ok_or_else(|| anyhow!("project dropped while waiting for buffer"))?;
|
.ok_or_else(|| anyhow!("project dropped while waiting for buffer"))?;
|
||||||
};
|
};
|
||||||
|
buffer.update(&mut cx, |buffer, cx| buffer.git_diff_recalc(cx));
|
||||||
Ok(buffer)
|
Ok(buffer)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue