aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/vis.c b/vis.c
index 4323b4f..e61dd5b 100644
--- a/vis.c
+++ b/vis.c
@@ -727,11 +727,7 @@ static const char *suspend(Vis *vis, const char *keys, const Arg *arg) {
}
static const char *repeat(Vis *vis, const char *keys, const Arg *arg) {
- int count = vis->action.count;
- vis->action = vis->action_prev;
- if (count)
- vis->action.count = count;
- action_do(vis, &vis->action);
+ vis_repeat(vis);
return keys;
}
@@ -2835,3 +2831,11 @@ bool vis_macro_replay(Vis *vis, enum VisMacro id) {
buffer_release(&buf);
return true;
}
+
+void vis_repeat(Vis *vis) {
+ int count = vis->action.count;
+ vis->action = vis->action_prev;
+ if (count)
+ vis->action.count = count;
+ action_do(vis, &vis->action);
+}