From a163bcd8b0f2426585dc5d48a77b2451d473b76b Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 7 Jan 2020 12:05:16 +0100 Subject: [PATCH] Editor: always set format for visual whitespace Change-Id: I2ab4cb9f77d649c1c7d51dec1ef11005325a4710 Fixes: QTCREATORBUG-23040 Reviewed-by: Orgad Shaneh Reviewed-by: Eike Ziller --- src/plugins/texteditor/highlighter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/texteditor/highlighter.cpp b/src/plugins/texteditor/highlighter.cpp index 19f0656a152..e0790875200 100644 --- a/src/plugins/texteditor/highlighter.cpp +++ b/src/plugins/texteditor/highlighter.cpp @@ -302,8 +302,10 @@ static bool isClosingParenthesis(QChar c) void Highlighter::highlightBlock(const QString &text) { - if (!definition().isValid()) + if (!definition().isValid()) { + formatSpaces(text); return; + } QTextBlock block = currentBlock(); KSyntaxHighlighting::State state; TextDocumentLayout::setBraceDepth(block, TextDocumentLayout::braceDepth(block.previous()));