diff options
| author | Neil <nyamatongwe@gmail.com> | 2017-05-10 14:19:33 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2017-05-10 14:19:33 +1000 |
| commit | 614661b61fccc0b1b9db5356feb800ccaeda218a (patch) | |
| tree | 8bf8b03cc228542eadc64a7c17e99c7804c956ce | |
| parent | 789644c36be4220ae0920ec3bc60115a3a05b160 (diff) | |
| download | scintilla-mirror-614661b61fccc0b1b9db5356feb800ccaeda218a.tar.gz | |
Feature [feature-requests:#1187]. Update scroll bar when annotations added,
removed, or visibility changed.
| -rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
| -rw-r--r-- | src/Editor.cxx | 5 |
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(); } |
