diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-12-29 22:42:58 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-01-18 12:53:13 +0100 |
| commit | fb7f934204035b1e02c8394eee5c8b1df5e476ec (patch) | |
| tree | 0a42b20835fb7fe3cd31e28cb4c26d393a977f81 /vis-modes.c | |
| parent | 9997739b96a7fc142a18cb72cb7589bd4b4d61b0 (diff) | |
| download | vis-fb7f934204035b1e02c8394eee5c8b1df5e476ec.tar.gz vis-fb7f934204035b1e02c8394eee5c8b1df5e476ec.tar.xz | |
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.
Diffstat (limited to 'vis-modes.c')
| -rw-r--r-- | vis-modes.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); } } |
