diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-02-21 14:47:05 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-02-21 14:50:34 +0100 |
| commit | ec9007f0512930bc16f23e97ea626799187700b6 (patch) | |
| tree | 83ab567d62619664340a3ac6c9c849a07d427965 | |
| parent | ba55c3974df68bff8941bc32470fb3a6dac1e26d (diff) | |
| download | vis-ec9007f0512930bc16f23e97ea626799187700b6.tar.gz vis-ec9007f0512930bc16f23e97ea626799187700b6.tar.xz | |
sam: make sure all commands can be undone
Take a snapshot before and after processing the transcript.
| -rw-r--r-- | sam.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1137,6 +1137,7 @@ enum SamError sam_cmd(Vis *vis, const char *s) { err = t->error; continue; } + vis_file_snapshot(vis, file); ptrdiff_t delta = 0; for (Change *c = t->changes; c; c = c->next) { c->range.start += delta; @@ -1176,6 +1177,7 @@ enum SamError sam_cmd(Vis *vis, const char *s) { } } sam_transcript_free(&file->transcript); + vis_file_snapshot(vis, file); } if (vis->win) { |
