summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/texteditor/highlighter.cpp4
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()));