Commit ab711a28 authored by Marco Benelli's avatar Marco Benelli

TextEditor: fix clearing of additional formats

Fix a wrong condition that causes closing brace in QML code to remain
highlighted when the code switchs between an invalid to a valid state.

Task-number: QTCREATORBUG-17499
Change-Id: I6b0df3a2b78993426a3d45c9e9af0a28b40104a3
Reviewed-by: David Schulz's avatarDavid Schulz <>
parent ec50c146
......@@ -136,7 +136,7 @@ void SemanticHighlighter::clearExtraAdditionalFormatsUntilEnd(
QTextDocument *doc = highlighter->document();
const int firstBlockToClear = lastBlockNumber + 1;
if (firstBlockToClear <= doc->blockCount())
if (firstBlockToClear >= doc->blockCount())
QTextBlock b = doc->findBlockByNumber(firstBlockToClear);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment