Wire up refresh_anchors
in Editor::refresh_selections
and call it
This commit is contained in:
parent
7340e83059
commit
f37f839330
2 changed files with 13 additions and 2 deletions
|
@ -364,6 +364,8 @@ impl ProjectDiagnosticsEditor {
|
||||||
for group_state in &mut groups_to_add {
|
for group_state in &mut groups_to_add {
|
||||||
group_state.blocks = block_ids.by_ref().take(group_state.block_count).collect();
|
group_state.blocks = block_ids.by_ref().take(group_state.block_count).collect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
editor.refresh_selections(cx);
|
||||||
});
|
});
|
||||||
|
|
||||||
for ix in group_ixs_to_remove.into_iter().rev() {
|
for ix in group_ixs_to_remove.into_iter().rev() {
|
||||||
|
|
|
@ -3267,8 +3267,17 @@ impl Editor {
|
||||||
.flat_map(|selection| [&selection.start, &selection.end]),
|
.flat_map(|selection| [&selection.start, &selection.end]),
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
self.selections = self
|
||||||
todo!();
|
.selections
|
||||||
|
.iter()
|
||||||
|
.cloned()
|
||||||
|
.zip(anchors.chunks(2))
|
||||||
|
.map(|(mut selection, anchors)| {
|
||||||
|
selection.start = anchors[0].clone();
|
||||||
|
selection.end = anchors[1].clone();
|
||||||
|
selection
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_selections(&mut self, selections: Arc<[Selection<Anchor>]>, cx: &mut ViewContext<Self>) {
|
fn set_selections(&mut self, selections: Arc<[Selection<Anchor>]>, cx: &mut ViewContext<Self>) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue