From 4e556e4aaba49f4307ab4933a376e0c34d0be674 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 1 May 2022 14:31:17 +1000 Subject: Optimize case where there are no annotations --- src/Document.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Document.cxx') diff --git a/src/Document.cxx b/src/Document.cxx index 69eec5254..54d14cda3 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -2518,6 +2518,9 @@ int Document::AnnotationLines(Sci::Line line) const noexcept { } void Document::AnnotationClearAll() { + if (Annotations()->Empty()) { + return; + } const Sci::Line maxEditorLine = LinesTotal(); for (Sci::Line l=0; lEmpty()) { + return; + } const Sci::Line maxEditorLine = LinesTotal(); for (Sci::Line l=0; l