Commit 4c2c5c02 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Mark the white spaces using the VisualWhitespace format.

parent d78e64db
......@@ -159,8 +159,14 @@ void QScriptHighlighter::highlightBlock(const QString &text)
++index;
}
int firstNonSpace = 0;
int previousTokenEnd = 0;
for (int i = 0; i < tokens.size(); ++i) {
const Token &token = tokens.at(i);
setFormat(previousTokenEnd, token.begin() - previousTokenEnd, m_formats[VisualWhitespace]);
previousTokenEnd = token.end();
}
int firstNonSpace = 0;
if (! tokens.isEmpty()) {
const Token &tk = tokens.first();
firstNonSpace = tk.offset;
......
Supports Markdown
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