diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2020-10-01 20:46:27 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2020-10-10 10:03:17 +0200 |
| commit | 5f1ade1308a080fc27f43ae9504432255958a6f9 (patch) | |
| tree | 9a10b1d16a6f8159ac26284254b8e80e1fb8d71c /text.c | |
| parent | 54614939ff8e65d0831a8b64e575c03215a183aa (diff) | |
| download | vis-5f1ade1308a080fc27f43ae9504432255958a6f9.tar.gz vis-5f1ade1308a080fc27f43ae9504432255958a6f9.tar.xz | |
text: make text_snapshot return whether it succeeded
Currently this can't fail, but one can imagine implementations which do.
Diffstat (limited to 'text.c')
| -rw-r--r-- | text.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1341,11 +1341,12 @@ bool text_delete_range(Text *txt, const Filerange *r) { /* preserve the current text content such that it can be restored by * means of undo/redo operations */ -void text_snapshot(Text *txt) { +bool text_snapshot(Text *txt) { if (txt->current_revision) txt->last_revision = txt->current_revision; txt->current_revision = NULL; txt->cache = NULL; + return true; } |
