fix some vim mode bugs around deletions and failed motions
This commit is contained in:
parent
0cd2d9a9c8
commit
4977acf6a5
17 changed files with 154 additions and 97 deletions
|
@ -677,6 +677,19 @@ impl<'a> MutableSelectionsCollection<'a> {
|
|||
});
|
||||
}
|
||||
|
||||
pub fn maybe_move_cursors_with(
|
||||
&mut self,
|
||||
mut update_cursor_position: impl FnMut(
|
||||
&DisplaySnapshot,
|
||||
DisplayPoint,
|
||||
SelectionGoal,
|
||||
) -> Option<(DisplayPoint, SelectionGoal)>,
|
||||
) {
|
||||
self.move_cursors_with(|map, point, goal| {
|
||||
update_cursor_position(map, point, goal).unwrap_or((point, goal))
|
||||
})
|
||||
}
|
||||
|
||||
pub fn replace_cursors_with(
|
||||
&mut self,
|
||||
mut find_replacement_cursors: impl FnMut(&DisplaySnapshot) -> Vec<DisplayPoint>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue