From fb7f934204035b1e02c8394eee5c8b1df5e476ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 29 Dec 2016 22:42:58 +0100 Subject: vis: do not take undo snaphots while replaying a macro The vis_keys_feed function is currently unaffected by this change. It still creates individual undo points. While this is probably undesirable from an API point of view, it keeps the lua based tests that use undo points working. --- vis-modes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vis-modes.c') diff --git a/vis-modes.c b/vis-modes.c index 8df7b16..c3ade9f 100644 --- a/vis-modes.c +++ b/vis-modes.c @@ -190,13 +190,13 @@ static void vis_mode_insert_enter(Vis *vis, Mode *old) { static void vis_mode_insert_leave(Vis *vis, Mode *new) { if (new == mode_get(vis, VIS_MODE_NORMAL)) { /* make sure we can recover the current state after an editing operation */ - text_snapshot(vis->win->file->text); + vis_file_snapshot(vis, vis->win->file); macro_operator_stop(vis); } } static void vis_mode_insert_idle(Vis *vis) { - text_snapshot(vis->win->file->text); + vis_file_snapshot(vis, vis->win->file); } static void vis_mode_insert_input(Vis *vis, const char *str, size_t len) { @@ -220,7 +220,7 @@ static void vis_mode_replace_enter(Vis *vis, Mode *old) { static void vis_mode_replace_leave(Vis *vis, Mode *new) { if (new == mode_get(vis, VIS_MODE_NORMAL)) { /* make sure we can recover the current state after an editing operation */ - text_snapshot(vis->win->file->text); + vis_file_snapshot(vis, vis->win->file); macro_operator_stop(vis); } } -- cgit v1.2.3