From 484a0be6e61f7e75c8b35efb14488a2229378824 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 29 Jun 2014 08:49:06 +0000 Subject: [PATCH] Updating the pointer to the bottom of the file when undoing line deletions at file's end. Patch by Mark Majeres. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5033 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 ++++ src/text.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index bba91821..e54f0327 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-06-29 Mark Majeres + * src/text.c (do_undo): Update the pointer to the bottom of the file + when undoing line deletions at file's end. + 2014-06-28 Benno Schulenberg * src/prompt.c (do_statusbar_input): Remove the useless parameters 'have_shortcut and 'allow_funcs'; the latter is only ever TRUE. diff --git a/src/text.c b/src/text.c index 132ac234..cb050e2a 100644 --- a/src/text.c +++ b/src/text.c @@ -486,6 +486,8 @@ void do_undo(void) free(f->data); f->data = data; splice_node(f, t, f->next); + if (f == openfile->filebot) + openfile->filebot = t; goto_line_posx(u->lineno, u->begin); break; case CUT_EOF: -- 2.39.5