From f9d4fd37552f2f284f46238272f5f1307427dc23 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sat, 14 Nov 2009 19:57:38 +0000 Subject: [PATCH] 2009-11-14 Chris Allegretta * move.c (do_first_line, do_last_line): Just set edit_refresh_needed rather than get messy. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4423 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 ++++ src/move.c | 10 ++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 09cd2cf2..276cfa4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-11-14 Chris Allegretta + * move.c (do_first_line, do_last_line): Just set edit_refresh_needed rather than + get messy. + 2009-11-13 Chris Allegretta * winio.c: Add new static maxsize to be able to easier calculation with softwrap. diff --git a/src/move.c b/src/move.c index 737404de..ebea8817 100644 --- a/src/move.c +++ b/src/move.c @@ -29,28 +29,22 @@ /* Move to the first line of the file. */ void do_first_line(void) { - filestruct *current_save = openfile->current; - size_t pww_save = openfile->placewewant; - openfile->current = openfile->fileage; openfile->current_x = 0; openfile->placewewant = 0; - edit_redraw(current_save, pww_save); + edit_refresh_needed = 1; } /* Move to the last line of the file. */ void do_last_line(void) { - filestruct *current_save = openfile->current; - size_t pww_save = openfile->placewewant; - openfile->current = openfile->filebot; openfile->current_x = strlen(openfile->filebot->data); openfile->placewewant = xplustabs(); openfile->current_y = editwinrows - 1; - edit_redraw(current_save, pww_save); + edit_refresh_needed = 1; } /* Move up one page. */ -- 2.39.5