From d0982536a742b5bfcf33519a0c085d85165dd5f4 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Sun, 30 Dec 2018 11:21:56 -0600 Subject: [PATCH] undo: after undoing a cut, don't remove the magicline if we're on it This fixes https://savannah.gnu.org/bugs/?55332. --- src/text.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/text.c b/src/text.c index f55bbb6a..3c396be5 100644 --- a/src/text.c +++ b/src/text.c @@ -671,7 +671,8 @@ void undo_cut(undo *u) copy_from_buffer(u->cutbuffer); /* If the final line was originally cut, remove the extra magicline. */ - if ((u->xflags & WAS_FINAL_LINE) && !ISSET(NO_NEWLINES)) + if ((u->xflags & WAS_FINAL_LINE) && !ISSET(NO_NEWLINES) && + openfile->current != openfile->filebot) remove_magicline(); if (!(u->xflags & WAS_MARKED_FORWARD) && u->type != PASTE)