From 21d2318d576e3e0e20dcdc2fbd111c8d6d856732 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