From c66d8cf51fc7e7f326310785470c74a9705a0072 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 20 Dec 2002 11:11:27 +0000 Subject: Added moveThumb argument to ScrollTo to allow smoother manipulation of thumb on GTK+ --- src/Editor.cxx | 6 ++++-- src/Editor.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 4c5ab8f41..92b0f0057 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -880,7 +880,7 @@ void Editor::SetLastXChosen() { lastXChosen = pt.x; } -void Editor::ScrollTo(int line) { +void Editor::ScrollTo(int line, bool moveThumb) { int topLineNew = Platform::Clamp(line, 0, MaxScrollPos()); if (topLineNew != topLine) { // Try to optimise small scrolls @@ -893,7 +893,9 @@ void Editor::ScrollTo(int line) { } else { Redraw(); } - SetVerticalScrollPos(); + if (moveThumb) { + SetVerticalScrollPos(); + } } } diff --git a/src/Editor.h b/src/Editor.h index d4cbe50ff..6d9287705 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -327,7 +327,7 @@ protected: // ScintillaBase subclass needs access to much of Editor int MovePositionSoVisible(int pos, int moveDir); void SetLastXChosen(); - void ScrollTo(int line); + void ScrollTo(int line, bool moveThumb=true); virtual void ScrollText(int linesToMove); void HorizontalScrollTo(int xPos); void MoveCaretInsideView(bool ensureVisible=true); -- cgit v1.2.3