Start work on showing consistent replica ids for channel buffers
Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
11ef5e2740
commit
7e83138805
8 changed files with 202 additions and 7 deletions
|
@ -559,6 +559,7 @@ pub struct Editor {
|
|||
blink_manager: ModelHandle<BlinkManager>,
|
||||
show_local_selections: bool,
|
||||
mode: EditorMode,
|
||||
replica_id_mapping: Option<HashMap<ReplicaId, ReplicaId>>,
|
||||
show_gutter: bool,
|
||||
show_wrap_guides: Option<bool>,
|
||||
placeholder_text: Option<Arc<str>>,
|
||||
|
@ -1394,6 +1395,7 @@ impl Editor {
|
|||
blink_manager: blink_manager.clone(),
|
||||
show_local_selections: true,
|
||||
mode,
|
||||
replica_id_mapping: None,
|
||||
show_gutter: mode == EditorMode::Full,
|
||||
show_wrap_guides: None,
|
||||
placeholder_text: None,
|
||||
|
@ -1604,6 +1606,15 @@ impl Editor {
|
|||
self.read_only = read_only;
|
||||
}
|
||||
|
||||
pub fn set_replica_id_mapping(
|
||||
&mut self,
|
||||
mapping: HashMap<ReplicaId, ReplicaId>,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) {
|
||||
self.replica_id_mapping = Some(mapping);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
fn selections_did_change(
|
||||
&mut self,
|
||||
local: bool,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue