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
This commit is contained in:
David Lawrence Ramsey 2005-05-14 18:41:25 +00:00
parent 7f4dd35406
commit 02173c05dc
2 changed files with 12 additions and 2 deletions

View File

@ -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)

View File

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