aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2003-02-14 23:11:25 +0000
committernyamatongwe <unknown>2003-02-14 23:11:25 +0000
commita45d62bb26c51974033011099f0e349cba9db00b (patch)
tree1bfdd7ce5a0942ba6e6a203a4dc7535dfc045922 /src
parent97edb1f6e1ba466cbf3ee0fdd0b39a1569ee9c5d (diff)
downloadscintilla-mirror-a45d62bb26c51974033011099f0e349cba9db00b.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) {