From ab087c899bf0ece12242f065844a26d2bc371da3 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 7 Aug 2001 13:13:36 +0000 Subject: Fixed bug with atomatic scrolling when some folding has been done caused by using document line numbers rather than view line numbers. --- src/Editor.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 68089a5d9..7c44dfb0c 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3105,11 +3105,11 @@ void Editor::ButtonMove(Point pt) { // Autoscroll PRectangle rcClient = GetClientRectangle(); if (pt.y > rcClient.bottom) { - int lineMove = LineFromLocation(pt); + int lineMove = cs.DisplayFromDoc(LineFromLocation(pt)); ScrollTo(lineMove - LinesOnScreen() + 5); Redraw(); } else if (pt.y < rcClient.top) { - int lineMove = LineFromLocation(pt); + int lineMove = cs.DisplayFromDoc(LineFromLocation(pt)); ScrollTo(lineMove - 5); Redraw(); } -- cgit v1.2.3