From: David Lawrence Ramsey Date: Sat, 14 May 2005 18:41:25 +0000 (+0000) Subject: in cut_line(), set placewewant properly after cutting a line, to avoid a X-Git-Tag: v1.3.8~296 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=02173c05dccf6e192df625666e6598b7cee3b00b;p=nano.git in cut_line(), set placewewant properly after cutting a line, to avoid a problem where the screen won't be updated if (a) we're not on the first page when we cut the line, and (b) immediately after we cut the line, we hit End to move to the end of the line after it git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2504 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index b5c9dff3..90b524c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,13 @@ CVS code - search/replace history as "^P". This makes mouse clicks work properly on it. Changes to shortcut_init(), help_init(), nanogetstr(), and do_statusbar_input(). (DLR) +- cut.c: + cut_line() + - Set placewewant properly after cutting a line, to avoid a + problem where the screen won't be updated if (a) we're not on + the first page when we cut the line, and (b) immediately after + we cut the line, we hit End to move to the end of the line + after it. (DLR) - files.c: load_open_file() - Remove an unneeded clearok(FALSE). (DLR) diff --git a/src/cut.c b/src/cut.c index 05d87aaf..c2df1aa3 100644 --- a/src/cut.c +++ b/src/cut.c @@ -40,12 +40,15 @@ void cutbuffer_reset(void) } /* If we're not on the magicline, move all the text of the current line, - * plus the newline at the end, to the cutbuffer. */ + * plus the newline at the end, to the cutbuffer, and set the current + * place we want to where the line used to start. */ void cut_line(void) { - if (current->next != NULL) + if (current->next != NULL) { move_to_filestruct(&cutbuffer, &cutbottom, current, 0, current->next, 0); + placewewant = xplustabs(); + } } #ifndef NANO_SMALL