Skip to content
Snippets Groups Projects
Commit 4c2c5c02 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Mark the white spaces using the VisualWhitespace format.

parent d78e64db
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment