From c67ea1ffc19ed4578c8476696a7edf8860cb78ba Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 7 Mar 2024 11:28:11 +0100 Subject: [PATCH] undo: recompute the multidata when a piece of text is replaced When a justification (or even a spell check) is undone or redone, this might affect the matching of multiline regexes, so... schedule a recalculation of the multidata in those cases. This fixes https://savannah.gnu.org/bugs/?65426. The issue was reported by `correctmost`. Problem existed since version 6.3, commit 80c2000f. --- src/text.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/text.c b/src/text.c index f8f0dbad..4839ca03 100644 --- a/src/text.c +++ b/src/text.c @@ -664,8 +664,8 @@ void do_undo(void) #ifdef ENABLE_COLOR if (u->type <= REPLACE) check_the_multis(openfile->current); - else if (u->type == INSERT) - perturbed = TRUE; + else if (u->type == INSERT || u->type == COUPLE_BEGIN) + recook = TRUE; #endif /* When at the point where the buffer was last saved, unset "Modified". */ @@ -834,7 +834,7 @@ void do_redo(void) #ifdef ENABLE_COLOR if (u->type <= REPLACE) check_the_multis(openfile->current); - else if (u->type == INSERT) + else if (u->type == INSERT || u->type == COUPLE_END) recook = TRUE; #endif