From 5657ed9c68de4ba1c324493a3d8262be89c56b9f Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 20 Feb 2007 23:04:56 +0000 Subject: Fix for bug #1663839: stuttered page down doesn't work if lines are wrapped. --- src/Editor.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index d3d16036b..3070530cc 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4022,7 +4022,10 @@ void Editor::PageMove(int direction, selTypes sel, bool stuttered) { // I consider only the caretYSlop, and ignore the caretYPolicy-- is that a problem? int currentLine = pdoc->LineFromPosition(currentPos); int topStutterLine = topLine + caretYSlop; - int bottomStutterLine = topLine + LinesToScroll() - caretYSlop; + int bottomStutterLine = + pdoc->LineFromPosition(PositionFromLocation( + Point(lastXChosen, direction * vs.lineHeight * LinesToScroll()))) + - caretYSlop - 1; if (stuttered && (direction < 0 && currentLine > topStutterLine)) { topLineNew = topLine; -- cgit v1.2.3