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.)
master
Benno Schulenberg 2016-06-14 16:01:52 +02:00
parent 9536edfcc6
commit 883373cd76
1 changed files with 1 additions and 1 deletions

View File

@ -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) {