aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2003-02-14 23:11:25 +0000
committernyamatongwe <devnull@localhost>2003-02-14 23:11:25 +0000
commit21d2318d576e3e0e20dcdc2fbd111c8d6d856732 (patch)
tree1bfdd7ce5a0942ba6e6a203a4dc7535dfc045922 /src
parenta51205b50149745064a8b51a92a8b3fc77dc0a50 (diff)
downloadscintilla-mirror-21d2318d576e3e0e20dcdc2fbd111c8d6d856732.tar.gz
Fixed bug where autoscrolling off the end wrapped back to the beginning.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 4fe42874f..6cb5f6aa9 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -4403,6 +4403,9 @@ void Editor::ButtonMove(Point pt) {
PRectangle rcClient = GetClientRectangle();
if (pt.y > rcClient.bottom) {
int lineMove = cs.DisplayFromDoc(LineFromLocation(pt));
+ if (lineMove < 0) {
+ lineMove = cs.DisplayFromDoc(pdoc->LinesTotal()-1);
+ }
ScrollTo(lineMove - LinesOnScreen() + 5);
Redraw();
} else if (pt.y < rcClient.top) {