aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--vis.c7
2 files changed, 9 insertions, 1 deletions
diff --git a/README.md b/README.md
index dbdb42e..c0bc823 100644
--- a/README.md
+++ b/README.md
@@ -263,7 +263,8 @@ Operators can be forced to work line wise by specifying `V`.
The general purpose registers `[a-z]` can be used to record macros. Use
one of `[A-Z]` to append to an existing macro. `q` starts a recording,
- `@` plays it back. `@@` refers to the least recently recorded macro.
+ `@` plays it back. `@@` refers to the least recently recorded macro.
+ `@:` repeats the last :-command. `@/` is equivalent to `n` in normal mode.
### Command line prompt
diff --git a/vis.c b/vis.c
index cfdc210..e815012 100644
--- a/vis.c
+++ b/vis.c
@@ -976,6 +976,13 @@ static void macro_replay(Vis *vis, const Macro *macro) {
}
bool vis_macro_replay(Vis *vis, enum VisRegister id) {
+ if (id == VIS_REG_SEARCH)
+ return vis_motion(vis, VIS_MOVE_SEARCH_NEXT);
+ if (id == VIS_REG_COMMAND) {
+ const char *cmd = register_get(vis, &vis->registers[id], NULL);
+ return vis_cmd(vis, cmd);
+ }
+
Macro *macro = macro_get(vis, id);
if (!macro || macro == vis->recording)
return false;