From 714875f3c0c22ed01a8e777755b281c97f2b52b8 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Thu, 18 Dec 2025 02:10:46 +0100 Subject: fixup: must not use teco_view_save_to_file() when creating backup/recovery files * It emits undo tokens which would bring internal datastructures - especially the undo stack - out of sync. * We now document that teco_view_save_to_channel() will always be without undo token emission. --- src/view.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/view.c') diff --git a/src/view.c b/src/view.c index eeb4d3d..d5b5d14 100644 --- a/src/view.c +++ b/src/view.c @@ -508,6 +508,13 @@ teco_undo_remove_file_push(const gchar *filename) strcpy(ctx, filename); } +/** + * Save the view's document to the given IO channel. + * + * @note This must not emit undo tokens as it is also used by teco_ring_backup(). + * + * @memberof teco_view_t + */ gboolean teco_view_save_to_channel(teco_view_t *ctx, GIOChannel *channel, GError **error) { -- cgit v1.2.3