From f6a9859562ddeb04e882e4a3d15adbf64345452a Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Sun, 17 Jul 2022 14:09:52 +1000 Subject: Feature [feature-requests:#1441] Line state optimized to avoid excess allocations by always allocating for every line. --- src/Document.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Document.cxx') diff --git a/src/Document.cxx b/src/Document.cxx index 8e80502e0..5fd2f79e5 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -2424,7 +2424,7 @@ void Document::SetLexInterface(std::unique_ptr pLexInterface) noex } int SCI_METHOD Document::SetLineState(Sci_Position line, int state) { - const int statePrevious = States()->SetLineState(line, state); + const int statePrevious = States()->SetLineState(line, state, LinesTotal()); if (state != statePrevious) { const DocModification mh(ModificationFlags::ChangeLineState, LineStart(line), 0, 0, nullptr, static_cast(line)); -- cgit v1.2.3