When redoing a line join at the tail of the file,

make sure openfile->filebot is updated.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5007 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-06-22 10:14:48 +00:00
parent fb6c0cd20c
commit 07f40612e1
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2014-06-22 Mark Majeres <mark@engine12.com>
* src/text.c (do_redo): When redoing a line join at the tail
of the file, make sure openfile->filebot is updated.
2014-06-21 Mark Majeres <mark@engine12.com> 2014-06-21 Mark Majeres <mark@engine12.com>
* src/text.c (undo_cut, add_undo): When undoing a cut-till-eof, * src/text.c (undo_cut, add_undo): When undoing a cut-till-eof,
put the cursor back where the cut started, and not at the end. put the cursor back where the cut started, and not at the end.

View File

@ -640,6 +640,8 @@ void do_redo(void)
strcat(f->data, u->strdata); strcat(f->data, u->strdata);
if (f->next != NULL) { if (f->next != NULL) {
filestruct *tmp = f->next; filestruct *tmp = f->next;
if (tmp == openfile->filebot)
openfile->filebot = f;
unlink_node(tmp); unlink_node(tmp);
delete_node(tmp); delete_node(tmp);
} }