From 614661b61fccc0b1b9db5356feb800ccaeda218a Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 10 May 2017 14:19:33 +1000 Subject: Feature [feature-requests:#1187]. Update scroll bar when annotations added, removed, or visibility changed. --- doc/ScintillaHistory.html | 4 ++++ src/Editor.cxx | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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 @@ Bug #1931.
  • + Update scroll bar when annotations added, removed, or visibility changed. + Feature #1187. +
  • +
  • Canceling modes with the Esc key preserves a rectangular selection. Bug #1940.
  • 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(); } -- cgit v1.2.3