nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit d0982536a742b5bfcf33519a0c085d85165dd5f4
parent 798695ff1ec0bec2605eb490008f2968a5e8c264
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Sun, 30 Dec 2018 11:21:56 -0600

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

This fixes https://savannah.gnu.org/bugs/?55332.

Diffstat:
Msrc/text.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 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)