From 34d38fe1c68802914634042bdd9cd9433efb1e3b Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 22 Mar 2020 19:16:22 +0100 Subject: [PATCH] undo: treat a cut-until-end-of-buffer like a backward marked region This fixes https://savannah.gnu.org/bugs/?58024. Bug existed since commit ac612545 from two weeks go. --- src/text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text.c b/src/text.c index 9e35ec14..b62941e3 100644 --- a/src/text.c +++ b/src/text.c @@ -1012,7 +1012,7 @@ void add_undo(undo_type action, const char *message) break; #endif case CUT_TO_EOF: - u->xflags |= INCLUDED_LAST_LINE; + u->xflags |= (INCLUDED_LAST_LINE | WAS_MARKED_BACKWARDS); break; case ZAP: case CUT: