vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 21da7808507854479fc7578f3360d128f13868e5 parent 457e70c914aa06b1020cd6c4bef3e0273dcec014 Author: Marc André Tanner <mat@brain-dump.org> Date: Thu, 29 Dec 2016 22:50:13 +0100 vis: support count for macro replay Fix #448 Diffstat:
| M | vis.c | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git 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; }