Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
4c2c5c02
Commit
4c2c5c02
authored
Jan 29, 2010
by
Roberto Raggi
Browse files
Mark the white spaces using the VisualWhitespace format.
parent
d78e64db
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/qmljs/qmljshighlighter.cpp
View file @
4c2c5c02
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment