aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/ScintillaHistory.html4
-rw-r--r--src/Editor.cxx5
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index a2ae13234..0507227cd 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -571,6 +571,10 @@
<a href="http://sourceforge.net/p/scintilla/bugs/1931/">Bug #1931</a>.
</li>
<li>
+ Update scroll bar when annotations added, removed, or visibility changed.
+ <a href="http://sourceforge.net/p/scintilla/feature-requests/1187/">Feature #1187.</a>
+ </li>
+ <li>
Canceling modes with the Esc key preserves a rectangular selection.
<a href="http://sourceforge.net/p/scintilla/bugs/1940/">Bug #1940</a>.
</li>
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 77443d52f..63ec27786 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -2629,7 +2629,9 @@ void Editor::NotifyModified(Document *, DocModification mh, void *) {
if (mh.modificationType & SC_MOD_CHANGEANNOTATION) {
Sci::Line lineDoc = pdoc->LineFromPosition(mh.position);
if (vs.annotationVisible) {
- cs.SetHeight(lineDoc, cs.GetHeight(lineDoc) + mh.annotationLinesAdded);
+ if (cs.SetHeight(lineDoc, cs.GetHeight(lineDoc) + mh.annotationLinesAdded)) {
+ SetScrollBars();
+ }
Redraw();
}
}
@@ -5276,6 +5278,7 @@ void Editor::SetAnnotationVisible(int visible) {
cs.SetHeight(line, cs.GetHeight(line) + annotationLines * dir);
}
}
+ SetScrollBars();
}
Redraw();
}