Revert "Remove into SelectionEffects
from .change_selections"
This reverts commit 28380d714d
.
This commit is contained in:
parent
28380d714d
commit
6e762d9c05
65 changed files with 625 additions and 837 deletions
|
@ -5,8 +5,8 @@ use crate::{
|
|||
state::Mode,
|
||||
};
|
||||
use editor::{
|
||||
Anchor, Bias, Editor, EditorSnapshot, SelectionEffects, ToOffset, ToPoint,
|
||||
display_map::ToDisplayPoint,
|
||||
Anchor, Bias, Editor, EditorSnapshot, ToOffset, ToPoint, display_map::ToDisplayPoint,
|
||||
scroll::Autoscroll,
|
||||
};
|
||||
use gpui::{Context, Window, actions};
|
||||
use language::{Point, SelectionGoal};
|
||||
|
@ -72,7 +72,7 @@ impl Vim {
|
|||
|
||||
editor.edit_with_block_indent(edits.clone(), Vec::new(), cx);
|
||||
|
||||
editor.change_selections(SelectionEffects::no_scroll(), window, cx, |s| {
|
||||
editor.change_selections(None, window, cx, |s| {
|
||||
s.select_anchor_ranges(edits.iter().map(|(range, _)| range.end..range.end));
|
||||
});
|
||||
editor.set_clip_at_line_ends(true, cx);
|
||||
|
@ -124,7 +124,7 @@ impl Vim {
|
|||
|
||||
editor.edit(edits, cx);
|
||||
|
||||
editor.change_selections(SelectionEffects::no_scroll(), window, cx, |s| {
|
||||
editor.change_selections(None, window, cx, |s| {
|
||||
s.select_ranges(new_selections);
|
||||
});
|
||||
editor.set_clip_at_line_ends(true, cx);
|
||||
|
@ -251,7 +251,7 @@ impl Vim {
|
|||
}
|
||||
|
||||
if let Some(position) = final_cursor_position {
|
||||
editor.change_selections(Default::default(), window, cx, |s| {
|
||||
editor.change_selections(Some(Autoscroll::fit()), window, cx, |s| {
|
||||
s.move_with(|_map, selection| {
|
||||
selection.collapse_to(position, SelectionGoal::None);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue