editor: Remove buffer and display map fields from SelectionsCollection (#42175)

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Lukas Wirth
2025-11-07 11:21:14 +01:00
committed by GitHub
parent c2416d6bab
commit 88a8e53696
18 changed files with 394 additions and 367 deletions
+2 -2
View File
@@ -179,7 +179,7 @@ pub fn register(editor: &mut Editor, cx: &mut Context<Vim>) {
vim.update_editor(cx, |_, editor, cx| {
editor.set_clip_at_line_ends(false, cx);
editor.change_selections(Default::default(), window, cx, |s| {
let map = s.display_map();
let map = s.display_snapshot();
let ranges = ranges
.into_iter()
.map(|(start, end, reversed)| {
@@ -304,7 +304,7 @@ impl Vim {
) {
let text_layout_details = editor.text_layout_details(window);
editor.change_selections(Default::default(), window, cx, |s| {
let map = &s.display_map();
let map = &s.display_snapshot();
let mut head = s.newest_anchor().head().to_display_point(map);
let mut tail = s.oldest_anchor().tail().to_display_point(map);