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.
This commit is contained in:
Benno Schulenberg
2024-03-07 11:28:11 +01:00
parent 5bd5bcd06a
commit c67ea1ffc1

View File

@@ -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