From: Chris Allegretta Date: Thu, 27 Sep 2001 00:44:58 +0000 (+0000) Subject: Fixes to paging (smooth scroll) by David Lawrence Ramsey X-Git-Tag: v1.1.2~44 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5050d35e871f870f595d3154084a77d50888851d;p=nano.git Fixes to paging (smooth scroll) by David Lawrence Ramsey git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@788 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index f9f1bbae..e55bf9d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,7 +17,8 @@ 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(). + changes to page_up() and page_down(). Fixes to paging by + David Lawrence Ramsey. - Bracket (brace, parens, etc) matching code by Ken Tyler. New functions do_find_bracket(), changes to findnextstr(), command is Meta-] (hope you dont mind since I already sold off diff --git a/move.c b/move.c index 8f2802b9..17d9684f 100644 --- a/move.c +++ b/move.c @@ -36,19 +36,17 @@ void page_down(void) { - if (editbot != filebot) { - if (!ISSET(SMOOTHSCROLL)) { + if (!ISSET(SMOOTHSCROLL)) { + if (editbot != filebot) { edit_update(editbot->next, CENTER); center_cursor(); } else { - edit_update(editbot, NONE); - } - } else { - if (!ISSET(SMOOTHSCROLL)) { while (current != filebot) current = current->next; edit_update(current, CENTER); } + } else { + edit_update(editbot, NONE); } update_cursor(); }