diff options
author | David Schulz <david.schulz@qt.io> | 2020-01-07 12:05:16 +0100 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2020-01-07 12:28:07 +0000 |
commit | a163bcd8b0f2426585dc5d48a77b2451d473b76b (patch) | |
tree | fa8ba38f12e82a2ce0581e5cc88a16eb9542dd6c | |
parent | dff4469bafd514c408d390a030b25459e3215ec0 (diff) | |
download | qt-creator-a163bcd8b0f2426585dc5d48a77b2451d473b76b.tar.gz |
Editor: always set format for visual whitespace
Change-Id: I2ab4cb9f77d649c1c7d51dec1ef11005325a4710
Fixes: QTCREATORBUG-23040
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r-- | src/plugins/texteditor/highlighter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/texteditor/highlighter.cpp b/src/plugins/texteditor/highlighter.cpp index 19f0656a15..e079087520 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())); |