nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 02173c05dccf6e192df625666e6598b7cee3b00b
parent 7f4dd35406b79b5c1d7aa695b2b96d366773c9fa
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Sat, 14 May 2005 18:41:25 +0000

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

Diffstat:
MChangeLog | 7+++++++
Msrc/cut.c | 7+++++--
2 files changed, 12 insertions(+), 2 deletions(-)

diff --git 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 @@ -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