Implement Copy for multibuffer anchors

This commit is contained in:
Max Brunsfeld 2022-11-23 16:56:22 -08:00
parent f71145bb32
commit 718f802157
7 changed files with 26 additions and 34 deletions

View file

@ -114,12 +114,12 @@ pub fn change(_: &mut Workspace, _: &VisualChange, cx: &mut ViewContext<Workspac
};
edits.push((expanded_range, "\n"));
new_selections.push(selection.map(|_| anchor.clone()));
new_selections.push(selection.map(|_| anchor));
} else {
let range = selection.map(|p| p.to_point(map)).range();
let anchor = map.buffer_snapshot.anchor_after(range.end);
edits.push((range, ""));
new_selections.push(selection.map(|_| anchor.clone()));
new_selections.push(selection.map(|_| anchor));
}
selection.goal = SelectionGoal::None;
});