From 1cddc3d0b69ef07eedc6021ae4543d28488c3396 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 8 Feb 2024 11:07:40 +0100 Subject: [PATCH] TextEditor: fix applying empty list of format changes The block might have had some highlighting before the update, so compare the new ranges against the one from the layout and update the layout if the format ranges differ. Change-Id: Ia6a0025e74fa8941b1cccc00baa93d3d37cb9ff9 Reviewed-by: Artem Sokolovskii --- src/plugins/texteditor/syntaxhighlighterrunner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/texteditor/syntaxhighlighterrunner.cpp b/src/plugins/texteditor/syntaxhighlighterrunner.cpp index 0d5e32893ee..094e97e7a08 100644 --- a/src/plugins/texteditor/syntaxhighlighterrunner.cpp +++ b/src/plugins/texteditor/syntaxhighlighterrunner.cpp @@ -185,7 +185,7 @@ void SyntaxHighlighterRunner::applyFormatRanges(const QListformats()) { TextDocumentLayout::FoldValidator foldValidator; foldValidator.setup(qobject_cast(m_document->documentLayout())); docBlock.layout()->setFormats(result.m_formatRanges);