forked from qt-creator/qt-creator
QmlJSEditor: Fix semantic highlighting
Do not send empty ranges as they may mess up the highlighting of the file. Fixes: QTCREATORBUG-23729 Change-Id: I77adcccb3a3da890e87f0b2860b945819446a3a8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -269,9 +269,12 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
if (type != SemanticHighlighter::UnknownType)
|
||||
if (type != SemanticHighlighter::UnknownType) {
|
||||
// do not add uses of length 0 - this messes up highlighting (e.g. anon functions)
|
||||
if (location.length != 0)
|
||||
addUse(location, type);
|
||||
}
|
||||
}
|
||||
|
||||
void processTypeId(UiQualifiedId *typeId)
|
||||
{
|
||||
|
Reference in New Issue
Block a user