Revert "Remove into SelectionEffects from .change_selections"

This reverts commit 28380d714d.
This commit is contained in:
Conrad Irwin
2025-06-27 14:06:17 -06:00
parent 28380d714d
commit 6e762d9c05
65 changed files with 625 additions and 837 deletions
@@ -1,5 +1,5 @@
use crate::{
AnchorRangeExt, DisplayPoint, Editor, MultiBuffer, RowExt,
AnchorRangeExt, Autoscroll, DisplayPoint, Editor, MultiBuffer, RowExt,
display_map::{HighlightKey, ToDisplayPoint},
};
use buffer_diff::DiffHunkStatusKind;
@@ -362,7 +362,7 @@ impl EditorTestContext {
let (unmarked_text, selection_ranges) = marked_text_ranges(marked_text, true);
self.editor.update_in(&mut self.cx, |editor, window, cx| {
editor.set_text(unmarked_text, window, cx);
editor.change_selections(Default::default(), window, cx, |s| {
editor.change_selections(Some(Autoscroll::fit()), window, cx, |s| {
s.select_ranges(selection_ranges)
})
});
@@ -379,7 +379,7 @@ impl EditorTestContext {
let (unmarked_text, selection_ranges) = marked_text_ranges(marked_text, true);
self.editor.update_in(&mut self.cx, |editor, window, cx| {
assert_eq!(editor.text(cx), unmarked_text);
editor.change_selections(Default::default(), window, cx, |s| {
editor.change_selections(Some(Autoscroll::fit()), window, cx, |s| {
s.select_ranges(selection_ranges)
})
});