respect count for repeating motion (#3057)

This commit is contained in:
Bob 2022-07-13 23:00:24 +08:00 committed by GitHub
parent 3cced1e3c8
commit e6a6e251c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1224,9 +1224,12 @@ fn extend_prev_char(cx: &mut Context) {
}
fn repeat_last_motion(cx: &mut Context) {
let count = cx.count();
let last_motion = cx.editor.last_motion.take();
if let Some(m) = &last_motion {
m.run(cx.editor);
for _ in 0..count {
m.run(cx.editor);
}
cx.editor.last_motion = last_motion;
}
}