diff options
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 4fce8bb2d..26032b85f 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4643,7 +4643,7 @@ void Editor::NotifyModified(Document *, DocModification mh, void *) { if ((!willRedrawAll) && ((paintState == notPainting) || !PaintContainsMargin())) { if (mh.modificationType & SC_MOD_CHANGEFOLD) { // Fold changes can affect the drawing of following lines so redraw whole margin - RedrawSelMargin(mh.line-1, true); + RedrawSelMargin(highlightDelimiter.isEnabled ? -1 : mh.line-1, true); } else { RedrawSelMargin(mh.line); } @@ -6701,7 +6701,7 @@ void Editor::SetBraceHighlight(Position pos0, Position pos1, int matchStyle) { void Editor::SetAnnotationHeights(int start, int end) { if (vs.annotationVisible) { bool changedHeight = false; - for (int line=start; line<end; line++) { + for (int line=start; line<end && line<pdoc->LinesTotal(); line++) { int linesWrapped = 1; if (wrapState != eWrapNone) { AutoSurface surface(this); |