Replicate pending selections separately from other selections
This fixes a panic that would occur when a leader created a pending selection that overlapped another selection, because the follower would attempt to treat that pending selection as non-pending, which would violate the invariant that selections are sorted and disjoint.
This commit is contained in:
@@ -853,9 +853,10 @@ message UpdateView {
|
||||
repeated ExcerptInsertion inserted_excerpts = 1;
|
||||
repeated uint64 deleted_excerpts = 2;
|
||||
repeated Selection selections = 3;
|
||||
EditorAnchor scroll_top_anchor = 4;
|
||||
float scroll_x = 5;
|
||||
float scroll_y = 6;
|
||||
optional Selection pending_selection = 4;
|
||||
EditorAnchor scroll_top_anchor = 5;
|
||||
float scroll_x = 6;
|
||||
float scroll_y = 7;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,9 +873,10 @@ message View {
|
||||
optional string title = 2;
|
||||
repeated Excerpt excerpts = 3;
|
||||
repeated Selection selections = 4;
|
||||
EditorAnchor scroll_top_anchor = 5;
|
||||
float scroll_x = 6;
|
||||
float scroll_y = 7;
|
||||
optional Selection pending_selection = 5;
|
||||
EditorAnchor scroll_top_anchor = 6;
|
||||
float scroll_x = 7;
|
||||
float scroll_y = 8;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,4 +6,4 @@ pub use conn::Connection;
|
||||
pub use peer::*;
|
||||
mod macros;
|
||||
|
||||
pub const PROTOCOL_VERSION: u32 = 43;
|
||||
pub const PROTOCOL_VERSION: u32 = 44;
|
||||
|
||||
Reference in New Issue
Block a user