From b5e76470281316be8b8ebdc4c6581f0cd8583f16 Mon Sep 17 00:00:00 2001
From: Chris Allegretta <chrisa@asty.org>
Date: Sun, 21 Mar 2010 04:35:17 +0000
Subject: [PATCH] 	* move.c (do_page_up): Explicitly set current_y to 0
 when paging up when not in 	  smooth scroll mode, as previous fixes would
 otherwise cause the cursor to not 	  really be moved to the stop of the
 screen.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4485 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog  | 5 +++++
 src/move.c | 1 +
 2 files changed, 6 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 89db5d74..9663b968 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-21 Chris Allegretta <chrisa@asty.org>
+	* move.c (do_page_up): Explicitly set current_y to 0 when paging up when not in
+	  smooth scroll mode, as previous fixes would otherwise cause the cursor to not
+	  really be moved to the stop of the screen.
+
 2010-03-07 Chris Allegretta <chrisa@asty.org>
 	* configure.ac, nano.c (handle_sigwinch): Create check for whether LINES and
 	  COLS can safely be redefined.  Fixes compilation issues with cygwin, and likely
diff --git a/src/move.c b/src/move.c
index 8c9c5710..5124dddb 100644
--- a/src/move.c
+++ b/src/move.c
@@ -68,6 +68,7 @@ void do_page_up(void)
     if (!ISSET(SMOOTH_SCROLL)) {
 #endif
 	openfile->current = openfile->edittop;
+	openfile->current_y = 0;
 	openfile->placewewant = 0;
 #ifndef NANO_TINY
     }
-- 
GitLab