undo: after undoing a cut, don't remove the magicline if we're on it

This fixes https://savannah.gnu.org/bugs/?55332.
master
David Lawrence Ramsey 2018-12-30 11:21:56 -06:00 committed by Benno Schulenberg
parent 798695ff1e
commit d0982536a7
1 changed files with 2 additions and 1 deletions

View File

@ -671,7 +671,8 @@ void undo_cut(undo *u)
copy_from_buffer(u->cutbuffer); copy_from_buffer(u->cutbuffer);
/* If the final line was originally cut, remove the extra magicline. */ /* 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(); remove_magicline();
if (!(u->xflags & WAS_MARKED_FORWARD) && u->type != PASTE) if (!(u->xflags & WAS_MARKED_FORWARD) && u->type != PASTE)