From 5f1ade1308a080fc27f43ae9504432255958a6f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 1 Oct 2020 20:46:27 +0200 Subject: text: make text_snapshot return whether it succeeded Currently this can't fail, but one can imagine implementations which do. --- text.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'text.c') 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; } -- cgit v1.2.3