Currently, the replace operator in vis gets lumped with following actions
in the {un,re}do tree. Using the 'r' key several times then attempting
to undo the last replacement undoes the entire series.
---
vis.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vis.c b/vis.c
index 87d6cd1..6112ef1 100644
--- a/vis.c
+++ b/vis.c
@@ -871,8 +871,8 @@ static void replace(const Arg *arg) {
if (!k.str[0])
return;
size_t pos = window_cursor_get(vis->win->win);
- action_reset(&action_prev);
- action_prev.op = &ops[OP_REPEAT_REPLACE];
+ action_reset(&action);
+ action.op = &ops[OP_REPEAT_REPLACE];
buffer_put(&buffer_repeat, k.str, strlen(k.str));
editor_delete_key(vis);
editor_insert_key(vis, k.str, strlen(k.str));
--
1.8.4