Exclude selections from editor splits in Editor::active_selection_sets

This commit is contained in:
Antonio Scandurra
2021-09-03 14:54:24 +02:00
parent bd13584807
commit 1b8ea08377
2 changed files with 7 additions and 5 deletions
+1 -2
View File
@@ -450,7 +450,6 @@ impl Element for EditorElement {
let mut selections = HashMap::new();
let mut active_rows = BTreeMap::new();
self.update_view(cx.app, |view, cx| {
let replica_id = view.replica_id(cx);
for selection_set_id in view.active_selection_sets(cx).collect::<Vec<_>>() {
let mut set = Vec::new();
for selection in view.selections_in_range(
@@ -459,7 +458,7 @@ impl Element for EditorElement {
cx,
) {
set.push(selection.clone());
if selection_set_id.replica_id == replica_id {
if selection_set_id == view.selection_set_id {
let is_empty = selection.start == selection.end;
let mut selection_start;
let mut selection_end;