aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--text.c3
-rw-r--r--text.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/text.c b/text.c
index 88b0f3b..2fc131a 100644
--- a/text.c
+++ b/text.c
@@ -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;
}
diff --git a/text.h b/text.h
index f5a6993..6027e62 100644
--- a/text.h
+++ b/text.h
@@ -166,7 +166,7 @@ bool text_appendf(Text*, const char *format, ...) __attribute__((format(printf,
/**
* Create a text snapshot, that is a vertice in the history graph.
*/
-void text_snapshot(Text*);
+bool text_snapshot(Text*);
/**
* Revert to previous snapshot along the main branch.
* @rst