Serialize deferred operations
This commit is contained in:
parent
d383ff30ce
commit
870fa5f278
4 changed files with 23 additions and 1 deletions
|
@ -327,6 +327,13 @@ impl Buffer {
|
|||
);
|
||||
}
|
||||
|
||||
let deferred_ops = message
|
||||
.deferred_operations
|
||||
.into_iter()
|
||||
.map(proto::deserialize_operation)
|
||||
.collect::<Result<Vec<_>>>()?;
|
||||
this.apply_ops(deferred_ops, cx)?;
|
||||
|
||||
Ok(this)
|
||||
}
|
||||
|
||||
|
@ -362,6 +369,16 @@ impl Buffer {
|
|||
proto::serialize_diagnostic_set(set.provider_name().to_string(), set.iter())
|
||||
})
|
||||
.collect(),
|
||||
deferred_operations: self
|
||||
.deferred_ops
|
||||
.iter()
|
||||
.map(proto::serialize_operation)
|
||||
.chain(
|
||||
self.text
|
||||
.deferred_ops()
|
||||
.map(|op| proto::serialize_operation(&Operation::Buffer(op.clone()))),
|
||||
)
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue