diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-10-25 14:50:24 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-10-25 22:46:43 +0100 |
| commit | fbb9265b95ab46824b7bc01621a01eb6a2362000 (patch) | |
| tree | 1fcb12796cea8115a6caa695f56e6612e7effa31 /vis.c | |
| parent | da6807c7fbbd6813cb3a4f1bd12b99c65e430390 (diff) | |
| download | vis-fbb9265b95ab46824b7bc01621a01eb6a2362000.tar.gz vis-fbb9265b95ab46824b7bc01621a01eb6a2362000.tar.xz | |
vis: introduce vis_repeat API
Diffstat (limited to 'vis.c')
| -rw-r--r-- | vis.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -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); +} |
