commit c67ea1ffc19ed4578c8476696a7edf8860cb78ba
parent 5bd5bcd06a60f309c744ca469cd163ef844744ff
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 7 Mar 2024 11:28:11 +0100
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.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git 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