Skip to content

Commit

Permalink
respect count for repeating motion (#3057)
Browse files Browse the repository at this point in the history
  • Loading branch information
QiBaobin authored Jul 13, 2022
1 parent 3cced1e commit e6a6e25
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 @@ -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;
}
}
Expand Down

0 comments on commit e6a6e25

Please sign in to comment.