mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-29 21:49:33 +00:00
Observe selection set lamport timestamps when deserializing buffer
This commit is contained in:
parent
bcd5c28833
commit
7c420050c7
1 changed files with 6 additions and 4 deletions
|
@ -426,16 +426,18 @@ impl Buffer {
|
|||
this.apply_ops(ops, cx)?;
|
||||
|
||||
for selection_set in message.selections {
|
||||
let lamport_timestamp = clock::Lamport {
|
||||
replica_id: selection_set.replica_id as ReplicaId,
|
||||
value: selection_set.lamport_timestamp,
|
||||
};
|
||||
this.remote_selections.insert(
|
||||
selection_set.replica_id as ReplicaId,
|
||||
SelectionSet {
|
||||
selections: proto::deserialize_selections(selection_set.selections),
|
||||
lamport_timestamp: clock::Lamport {
|
||||
replica_id: selection_set.replica_id as ReplicaId,
|
||||
value: selection_set.lamport_timestamp,
|
||||
},
|
||||
lamport_timestamp,
|
||||
},
|
||||
);
|
||||
this.text.lamport_clock.observe(lamport_timestamp);
|
||||
}
|
||||
let snapshot = this.snapshot();
|
||||
let entries = proto::deserialize_diagnostics(message.diagnostics);
|
||||
|
|
Loading…
Reference in a new issue