From 2c126b201f11543aec2064663a370ea063fcbd95 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 25 Nov 2018 19:55:20 +0100 Subject: [PATCH] text: turn the mark off when justifying, to not confuse an undo When leaving the mark on while justifying and then undoing the justification, things are likely to get messed up. My applying David's patches only partially caused this breakage. This fixes https://savannah.gnu.org/bugs/?55074. --- src/text.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/text.c b/src/text.c index d6434a1a..690797d5 100644 --- a/src/text.c +++ b/src/text.c @@ -2243,6 +2243,9 @@ void do_justify(bool full_justify) return; } + /* We cannot (yet) justify a marked region, so turn the mark off. */ + openfile->mark = NULL; + /* Prepare to put the text we want to justify in the cutbuffer. */ cutbuffer = NULL; cutbottom = NULL;