diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 6 | ||||
-rw-r--r-- | src/Editor.h | 2 |
2 files changed, 5 insertions, 3 deletions
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); |