diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
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; |