Change struct field name
This commit is contained in:
parent
0062cc000b
commit
bcc13e151c
2 changed files with 5 additions and 5 deletions
|
@ -367,7 +367,7 @@ pub struct Editor {
|
||||||
project: Option<Model<Project>>,
|
project: Option<Model<Project>>,
|
||||||
collaboration_hub: Option<Box<dyn CollaborationHub>>,
|
collaboration_hub: Option<Box<dyn CollaborationHub>>,
|
||||||
blink_manager: Model<BlinkManager>,
|
blink_manager: Model<BlinkManager>,
|
||||||
recently_focused: bool,
|
display_cursors: bool,
|
||||||
hovered_cursor: Option<HoveredCursor>,
|
hovered_cursor: Option<HoveredCursor>,
|
||||||
pub show_local_selections: bool,
|
pub show_local_selections: bool,
|
||||||
mode: EditorMode,
|
mode: EditorMode,
|
||||||
|
@ -1613,7 +1613,7 @@ impl Editor {
|
||||||
pixel_position_of_newest_cursor: None,
|
pixel_position_of_newest_cursor: None,
|
||||||
gutter_width: Default::default(),
|
gutter_width: Default::default(),
|
||||||
style: None,
|
style: None,
|
||||||
recently_focused: false,
|
display_cursors: false,
|
||||||
hovered_cursor: Default::default(),
|
hovered_cursor: Default::default(),
|
||||||
editor_actions: Default::default(),
|
editor_actions: Default::default(),
|
||||||
show_copilot_suggestions: mode == EditorMode::Full,
|
show_copilot_suggestions: mode == EditorMode::Full,
|
||||||
|
@ -3904,12 +3904,12 @@ impl Editor {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn display_cursors(&mut self, cx: &mut ViewContext<Self>) {
|
fn display_cursors(&mut self, cx: &mut ViewContext<Self>) {
|
||||||
self.recently_focused = true;
|
self.display_cursors = true;
|
||||||
cx.notify();
|
cx.notify();
|
||||||
cx.spawn(|this, mut cx| async move {
|
cx.spawn(|this, mut cx| async move {
|
||||||
cx.background_executor().timer(Duration::from_secs(2)).await;
|
cx.background_executor().timer(Duration::from_secs(2)).await;
|
||||||
this.update(&mut cx, |this, cx| {
|
this.update(&mut cx, |this, cx| {
|
||||||
this.recently_focused = false;
|
this.display_cursors = false;
|
||||||
cx.notify()
|
cx.notify()
|
||||||
})
|
})
|
||||||
.ok()
|
.ok()
|
||||||
|
|
|
@ -1999,7 +1999,7 @@ impl EditorElement {
|
||||||
if Some(selection.peer_id) == editor.leader_peer_id {
|
if Some(selection.peer_id) == editor.leader_peer_id {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let is_shown = editor.recently_focused || editor.hovered_cursor.as_ref().is_some_and(|c| c.replica_id == selection.replica_id && c.selection_id == selection.selection.id);
|
let is_shown = editor.display_cursors || editor.hovered_cursor.as_ref().is_some_and(|c| c.replica_id == selection.replica_id && c.selection_id == selection.selection.id);
|
||||||
|
|
||||||
remote_selections
|
remote_selections
|
||||||
.entry(selection.replica_id)
|
.entry(selection.replica_id)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue