Skip to content

Commit

Permalink
respect count for repeating motion (helix-editor#3057)
Browse files Browse the repository at this point in the history
  • Loading branch information
QiBaobin authored and thomasskk committed Sep 9, 2022
1 parent a4e3041 commit d068373
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1227,9 +1227,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;
}
}
Expand Down

0 comments on commit d068373

Please sign in to comment.