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
Marco Bubke
flatpak-qt-creator
Commits
32229e30
Commit
32229e30
authored
Sep 09, 2009
by
mae
Browse files
mark all-whitespace-lines with the correct visual format.
parent
f269031b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cpphighlighter.cpp
View file @
32229e30
...
...
@@ -73,6 +73,8 @@ void CppHighlighter::highlightBlock(const QString &text)
userData
->
setCollapseMode
(
TextBlockUserData
::
NoCollapse
);
}
TextEditDocumentLayout
::
clearParentheses
(
currentBlock
());
if
(
text
.
length
())
// the empty line can still contain whitespace
setFormat
(
0
,
text
.
length
(),
visualSpaceFormat
);
return
;
}
...
...
@@ -171,7 +173,7 @@ void CppHighlighter::highlightBlock(const QString &text)
}
// mark the trailing white spaces
if
(
!
tokens
.
isEmpty
())
{
{
const
SimpleToken
tk
=
tokens
.
last
();
const
int
lastTokenEnd
=
tk
.
position
()
+
tk
.
length
();
if
(
text
.
length
()
>
lastTokenEnd
)
...
...
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