1
1

oops: apparently the line numbers in the cutbuffer do matter

The line numbers don't matter for the cutbuffer itself, but they matter
for the copy of the cutbuffer that is stored in an undo item.

This reverts commit 14140d52 from two hours ago.

This fixes https://savannah.gnu.org/bugs/?56245.
Этот коммит содержится в:
Benno Schulenberg 2019-04-30 12:42:16 +02:00
родитель 772137cabe
Коммит fa21986ecf

Просмотреть файл

@ -318,7 +318,10 @@ void extract_buffer(linestruct **buffer_top, linestruct **buffer_bot,
if (*buffer_top == NULL) {
*buffer_top = openfile->filetop;
*buffer_bot = openfile->filebot;
renumber_from(*buffer_top);
} else {
linestruct *was_bottom = *buffer_bot;
/* Tack the data of the first line of the text onto the data of
* the last line in the given buffer. */
(*buffer_bot)->data = charealloc((*buffer_bot)->data,
@ -337,6 +340,8 @@ void extract_buffer(linestruct **buffer_top, linestruct **buffer_bot,
(*buffer_bot)->next->prev = *buffer_bot;
*buffer_bot = openfile->filebot;
}
renumber_from(was_bottom);
}
/* Since the text has now been saved, remove it from the file buffer. */