mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-24 03:16:52 +03:00
DLR's latest smooth scroll fix, case where there's not a full half page up from the cursor to fileage screws up the cursor position
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@806 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
222a0863fa
commit
d948edc4f3
@ -17,7 +17,7 @@ CVS code -
|
||||
- Mac file writing supported too. Flag -M, --mac. Toggle
|
||||
Meta-O (MacOS? OS-X? =-)
|
||||
- New smooth scroll code by Ken Tyler. New flag -S, --smooth,
|
||||
changes to page_up() and page_down(). Fixes to paging by
|
||||
changes to page_up() and page_down(). Many fixes to paging by
|
||||
David Lawrence Ramsey.
|
||||
- Bracket (brace, parens, etc) matching code by Ken Tyler.
|
||||
New functions do_find_bracket(), changes to findnextstr(),
|
||||
|
10
move.c
10
move.c
@ -143,7 +143,15 @@ void page_up(void)
|
||||
if (edittop != fileage) {
|
||||
if (!ISSET(SMOOTHSCROLL)) {
|
||||
edit_update(edittop, CENTER);
|
||||
center_cursor();
|
||||
/* Now that we've updated the edit window, edittop might be
|
||||
at the top of the file; if so, just move the cursor up one
|
||||
line and don't center it. */
|
||||
if (edittop != fileage)
|
||||
center_cursor();
|
||||
else {
|
||||
current = current->prev;
|
||||
reset_cursor();
|
||||
}
|
||||
} else {
|
||||
edit_update(edittop->prev, NONE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user