diff options
author | Bob | 2022-07-13 15:00:24 +0000 |
---|---|---|
committer | GitHub | 2022-07-13 15:00:24 +0000 |
commit | e6a6e251c5cb2c373584187c3d4d17b3eaac6b6a (patch) | |
tree | c5a80e2d55e2128bd3e7366a1126aa3590d9a29b | |
parent | 3cced1e3c825b0ae527f43358b29d9595c54065b (diff) |
respect count for repeating motion (#3057)
-rw-r--r-- | helix-term/src/commands.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 193d5d40..cb223faf 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -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; } } |