mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-06 18:46:49 +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)?;
|
this.apply_ops(ops, cx)?;
|
||||||
|
|
||||||
for selection_set in message.selections {
|
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(
|
this.remote_selections.insert(
|
||||||
selection_set.replica_id as ReplicaId,
|
selection_set.replica_id as ReplicaId,
|
||||||
SelectionSet {
|
SelectionSet {
|
||||||
selections: proto::deserialize_selections(selection_set.selections),
|
selections: proto::deserialize_selections(selection_set.selections),
|
||||||
lamport_timestamp: clock::Lamport {
|
lamport_timestamp,
|
||||||
replica_id: selection_set.replica_id as ReplicaId,
|
|
||||||
value: selection_set.lamport_timestamp,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
this.text.lamport_clock.observe(lamport_timestamp);
|
||||||
}
|
}
|
||||||
let snapshot = this.snapshot();
|
let snapshot = this.snapshot();
|
||||||
let entries = proto::deserialize_diagnostics(message.diagnostics);
|
let entries = proto::deserialize_diagnostics(message.diagnostics);
|
||||||
|
|
Loading…
Reference in a new issue