mirror of https://github.com/helix-editor/helix
respect count for repeating motion (#3057)
parent
3cced1e3c8
commit
e6a6e251c5
|
@ -1224,9 +1224,12 @@ fn extend_prev_char(cx: &mut Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn repeat_last_motion(cx: &mut Context) {
|
fn repeat_last_motion(cx: &mut Context) {
|
||||||
|
let count = cx.count();
|
||||||
let last_motion = cx.editor.last_motion.take();
|
let last_motion = cx.editor.last_motion.take();
|
||||||
if let Some(m) = &last_motion {
|
if let Some(m) = &last_motion {
|
||||||
m.run(cx.editor);
|
for _ in 0..count {
|
||||||
|
m.run(cx.editor);
|
||||||
|
}
|
||||||
cx.editor.last_motion = last_motion;
|
cx.editor.last_motion = last_motion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue