forked from qt-creator/qt-creator
Mark the trailing whitespaces.
This commit is contained in:
@@ -189,11 +189,11 @@ void QScriptHighlighter::highlightBlock(const QString &text)
|
|||||||
previousTokenEnd = token.end();
|
previousTokenEnd = token.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setFormat(previousTokenEnd, text.length() - previousTokenEnd, m_formats[VisualWhitespace]);
|
||||||
|
|
||||||
int firstNonSpace = 0;
|
int firstNonSpace = 0;
|
||||||
if (! tokens.isEmpty()) {
|
if (! tokens.isEmpty())
|
||||||
const Token &tk = tokens.first();
|
firstNonSpace = tokens.first().offset;
|
||||||
firstNonSpace = tk.offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
setCurrentBlockState(m_scanner.endState());
|
setCurrentBlockState(m_scanner.endState());
|
||||||
onBlockEnd(m_scanner.endState(), firstNonSpace);
|
onBlockEnd(m_scanner.endState(), firstNonSpace);
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ QmlHighlighter::QmlHighlighter(QTextDocument *parent) :
|
|||||||
m_braceDepth = 0;
|
m_braceDepth = 0;
|
||||||
|
|
||||||
QSet<QString> qmlKeywords(keywords());
|
QSet<QString> qmlKeywords(keywords());
|
||||||
|
qmlKeywords << QLatin1String("alias");
|
||||||
qmlKeywords << QLatin1String("property");
|
qmlKeywords << QLatin1String("property");
|
||||||
qmlKeywords << QLatin1String("signal");
|
qmlKeywords << QLatin1String("signal");
|
||||||
qmlKeywords << QLatin1String("readonly");
|
qmlKeywords << QLatin1String("readonly");
|
||||||
|
|||||||
Reference in New Issue
Block a user