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:
Rift 2025-06-28 00:05:47 -04:00 committed by GitHub
parent ba4fc1bcfc
commit 97c5c5a6e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 182 additions and 54 deletions

View file

@ -105,6 +105,7 @@ impl Vim {
&mut self,
object: Object,
around: bool,
times: Option<usize>,
window: &mut Window,
cx: &mut Context<Self>,
) {
@ -115,7 +116,7 @@ impl Vim {
editor.transact(window, cx, |editor, window, cx| {
editor.change_selections(Default::default(), window, cx, |s| {
s.move_with(|map, selection| {
objects_found |= object.expand_selection(map, selection, around);
objects_found |= object.expand_selection(map, selection, around, times);
});
});
if objects_found {