From a45d62bb26c51974033011099f0e349cba9db00b Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 14 Feb 2003 23:11:25 +0000 Subject: Fixed bug where autoscrolling off the end wrapped back to the beginning. --- src/Editor.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3