Commit 883373cd authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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.)
parent 9536edfc
Showing with 1 addition and 1 deletion
+1 -1
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment