[dev] [vis] [PATCH] Do not lump together replace actions

From: Wolfgang Corcoran-Mathe <first.lord.of.teal_AT_gmail.com>
Date: Tue, 27 Jan 2015 11:37:42 -0500

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
_AT_@ -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
Received on Tue Jan 27 2015 - 17:37:42 CET

This archive was generated by hypermail 2.3.0 : Tue Jan 27 2015 - 17:48:13 CET