on master help sign in
respect count for repeating motion (#3057)
commite6a6e251c5cb2c373584187c3d4d17b3eaac6b6a authorBob <QiBaobin@users.noreply.github.com> dateWed 13 Jul 2022, 23:00 (4 years ago) parent3cced1e
1 file changed+4−1
helix-term/src/commands.rs+4−1
helix-term/src/commands.rs+4−1
@@ -1224,9 +1224,12 @@ fn extend_prev_char(cx: &mut Context) {
12241224}
12251225
12261226fn repeat_last_motion(cx: &mut Context) {
1227+ let count = cx.count();
12271228 let last_motion = cx.editor.last_motion.take();
12281229 if let Some(m) = &last_motion {
1229− m.run(cx.editor);
1230+ for _ in 0..count {
1231+ m.run(cx.editor);
1232+ }
12301233 cx.editor.last_motion = last_motion;
12311234 }
12321235}