aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2002-12-20 11:11:27 +0000
committernyamatongwe <unknown>2002-12-20 11:11:27 +0000
commitc66d8cf51fc7e7f326310785470c74a9705a0072 (patch)
tree288e5c6263949805cd420d91c82f0c286dff9a52 /src
parent5c4f851266dd0a611f04305f149c1787378ab029 (diff)
downloadscintilla-mirror-c66d8cf51fc7e7f326310785470c74a9705a0072.tar.gz
Added moveThumb argument to ScrollTo to allow smoother manipulation of
thumb on GTK+
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx6
-rw-r--r--src/Editor.h2
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);