From 21ef05058c57f59328e4280383cdf34d3af7626a Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 6 Mar 2020 12:30:24 +0100 Subject: [PATCH] tweaks: add a COUPLE_END undo item a bit later, instead of updating it --- src/text.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/text.c b/src/text.c index 9f7548ec..815aa15e 100644 --- a/src/text.c +++ b/src/text.c @@ -2127,16 +2127,15 @@ void do_justify(bool full_justify) #ifndef NANO_TINY update_undo(PASTE); - add_undo(COUPLE_END, "justification"); - /* After justifying a backward-marked text, swap mark and cursor. */ if (openfile->mark && !right_side_up) { openfile->mark = openfile->current; openfile->mark_x = openfile->current_x; openfile->current = line_from_number(was_top_lineno); openfile->current_x = was_top_x; - update_undo(COUPLE_END); } + + add_undo(COUPLE_END, "justification"); #endif /* We're done justifying. Restore the old cutbuffer. */