mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-27 04:44:30 +00:00
Update git diff base when synchronizing a guest's buffers
This commit is contained in:
parent
529ccbda3a
commit
95098e4f29
1 changed files with 18 additions and 11 deletions
|
@ -5189,11 +5189,7 @@ impl Project {
|
||||||
|
|
||||||
let operations = buffer.serialize_ops(Some(remote_version), cx);
|
let operations = buffer.serialize_ops(Some(remote_version), cx);
|
||||||
let client = this.client.clone();
|
let client = this.client.clone();
|
||||||
let file = buffer.file().cloned();
|
if let Some(file) = buffer.file() {
|
||||||
cx.background()
|
|
||||||
.spawn(
|
|
||||||
async move {
|
|
||||||
if let Some(file) = file {
|
|
||||||
client
|
client
|
||||||
.send(proto::UpdateBufferFile {
|
.send(proto::UpdateBufferFile {
|
||||||
project_id,
|
project_id,
|
||||||
|
@ -5203,6 +5199,17 @@ impl Project {
|
||||||
.log_err();
|
.log_err();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
client
|
||||||
|
.send(proto::UpdateDiffBase {
|
||||||
|
project_id,
|
||||||
|
buffer_id: buffer_id as u64,
|
||||||
|
diff_base: buffer.diff_base().map(Into::into),
|
||||||
|
})
|
||||||
|
.log_err();
|
||||||
|
|
||||||
|
cx.background()
|
||||||
|
.spawn(
|
||||||
|
async move {
|
||||||
let operations = operations.await;
|
let operations = operations.await;
|
||||||
for chunk in split_operations(operations) {
|
for chunk in split_operations(operations) {
|
||||||
client
|
client
|
||||||
|
|
Loading…
Reference in a new issue