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 -1
View File
@@ -682,8 +682,9 @@ pub fn register(editor: &mut Editor, cx: &mut Context<Vim>) {
.disjoint_anchor_ranges()
.collect::<Vec<_>>()
});
let snapshot = editor.buffer().read(cx).snapshot(cx);
editor.change_selections(SelectionEffects::no_scroll(), window, cx, |s| {
let end = Point::new(range.end.0, s.buffer().line_len(range.end));
let end = Point::new(range.end.0, snapshot.line_len(range.end));
s.select_ranges([end..Point::new(range.start.0, 0)]);
});
selections