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,8 +269,11 @@ protected:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type != SemanticHighlighter::UnknownType)
|
if (type != SemanticHighlighter::UnknownType) {
|
||||||
addUse(location, type);
|
// 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)
|
void processTypeId(UiQualifiedId *typeId)
|
||||||
|
Reference in New Issue
Block a user