vim: Respect count for paragraphs (#33489)
Closes #32462 Release Notes: - vim: Paragraph objects now support counts (`d2ap`, `v2ap`, etc.) --------- Co-authored-by: Rift <no@e.mail> Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
parent
ba4fc1bcfc
commit
97c5c5a6e7
17 changed files with 182 additions and 54 deletions
|
@ -91,6 +91,7 @@ impl Vim {
|
|||
&mut self,
|
||||
object: Object,
|
||||
around: bool,
|
||||
times: Option<usize>,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
|
@ -103,7 +104,7 @@ impl Vim {
|
|||
let mut should_move_to_start: HashSet<_> = Default::default();
|
||||
editor.change_selections(Default::default(), window, cx, |s| {
|
||||
s.move_with(|map, selection| {
|
||||
object.expand_selection(map, selection, around);
|
||||
object.expand_selection(map, selection, around, times);
|
||||
let offset_range = selection.map(|p| p.to_offset(map, Bias::Left)).range();
|
||||
let mut move_selection_start_to_previous_line =
|
||||
|map: &DisplaySnapshot, selection: &mut Selection<DisplayPoint>| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue