page_up() - Rewritten with a loop to make screen updates work when mark is set (fixes bug #59).

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@618 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Chris Allegretta 2001-04-29 02:26:17 +00:00
parent 6efda54a6c
commit 6cb4e885f2
3 changed files with 12 additions and 7 deletions

2
BUGS
View File

@ -107,6 +107,8 @@
Matthias Andree) (58) [FIXED].
- Can modify the current file in view mode with ^W^R (discovered by Rocco
Corsi) (58) [FIXED].
- When page up is used after two page down's, the screen doesn't update
properly (discovered by David Lawrence Ramsey) (59) [FIXED].
** Open BUGS **

View File

@ -29,6 +29,10 @@ Cvs code -
- Added the "Goto Directory" code (Rocco)
- global.c:
- Updated some of the lists for the "Goto Directory" code (Rocco)
- move.c:
page_up()
- Rewritten with a loop to make screen updates work when
mark is set (fixes bug #59).
- nano.c:
do_alt_speller()
- Reposition cursor on same line as before ^T was called (Rocco)

13
move.c
View File

@ -146,7 +146,8 @@ void page_up_center(void)
int page_up(void)
{
filestruct *fileptr = edittop;
int i;
wrap_reset();
current_x = 0;
placewewant = 0;
@ -155,13 +156,11 @@ int page_up(void)
return 0;
current_y = 0;
if (fileptr->next != NULL)
fileptr = fileptr->next;
if (fileptr->next != NULL)
fileptr = fileptr->next;
current = edittop;
edit_update(fileptr, BOTTOM);
for (i = 0; i <= editwinrows - 3 && current->prev != NULL; i++)
current = current->prev;
edit_update(current, TOP);
update_cursor();
UNSET(KEEP_CUTBUFFER);