aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-12-29 22:50:13 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-01-18 13:49:33 +0100
commit87d81f090d83c5e3aa6866e34575e55a23241b37 (patch)
tree28138647c972cda084ea7ab6339b19f48200f3ba /vis.c
parentfb7f934204035b1e02c8394eee5c8b1df5e476ec (diff)
downloadvis-87d81f090d83c5e3aa6866e34575e55a23241b37.tar.gz
vis-87d81f090d83c5e3aa6866e34575e55a23241b37.tar.xz
vis: support count for macro replay
Fix #448
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/vis.c b/vis.c
index ab2f244..b67e660 100644
--- a/vis.c
+++ b/vis.c
@@ -1267,7 +1267,10 @@ bool vis_macro_replay(Vis *vis, enum VisRegister id) {
Macro *macro = macro_get(vis, id);
if (!macro || macro == vis->recording)
return false;
- macro_replay(vis, macro);
+ int count = vis_count_get_default(vis, 1);
+ vis_cancel(vis);
+ for (int i = 0; i < count; i++)
+ macro_replay(vis, macro);
vis_file_snapshot(vis, vis->win->file);
return true;
}