nano

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

commit 883373cd76044a5662a50c3d1c6b7dd3145f9f7d
parent 9536edfcc6826d42e99bdb24c1d501bd50a21f1a
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Tue, 14 Jun 2016 16:01:52 +0200

undo: start renumbering from the head of the paste, not from its tail

Because when undoing a paste at the end of the buffer, the tail line
probably does not exist any more.

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

(It would have been the proper fix for
https://savannah.gnu.org/bugs/?44488.)

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

diff --git a/src/text.c b/src/text.c @@ -751,7 +751,7 @@ void do_undo(void) case PASTE: undidmsg = _("text uncut"); undo_paste(u); - f = fsfromline(u->lineno); + f = fsfromline(u->mark_begin_lineno); break; case ENTER: if (f->next == NULL) {