From 7de528b487db78de9a9b60e366e64786502e6961 Mon Sep 17 00:00:00 2001 From: "g.willems" Date: Tue, 28 Nov 2023 19:57:11 +0100 Subject: [PATCH] gtktexthistory: allow set modified in irreversible action Allow setting the modified flag, but skip propagating the history state update as it will be done by gtk_text_history_end_irreversible_action(). Fixes #6236 Closes #6236 --- gtk/gtktexthistory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtktexthistory.c b/gtk/gtktexthistory.c index 292147a04a..3a5334cacd 100644 --- a/gtk/gtktexthistory.c +++ b/gtk/gtktexthistory.c @@ -1083,7 +1083,6 @@ gtk_text_history_modified_changed (GtkTextHistory *self, return_if_not_enabled (self); return_if_applying (self); - return_if_irreversible (self); /* If we have a new save point, clear all previous modified states. */ gtk_text_history_clear_modified (self); @@ -1115,7 +1114,8 @@ gtk_text_history_modified_changed (GtkTextHistory *self, self->is_modified = !!modified; self->is_modified_set = TRUE; - gtk_text_history_update_state (self); + if (!self->irreversible) + gtk_text_history_update_state (self); } void