Skip to content

Commit

Permalink
template should not be on ending xml tag linemarker
Browse files Browse the repository at this point in the history
  • Loading branch information
Haehnchen committed Feb 25, 2024
1 parent aba69d7 commit 3ab0600
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,20 @@ public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> psiElemen
// <foo-foo>
// <FooFoo>
if (psiElement.getNode().getElementType() == XmlTokenType.XML_NAME && psiElement.getParent() instanceof XmlTag xmlTag) {
PsiElement prevSibling = psiElement.getPrevSibling();
if (prevSibling.getNode().getElementType() == XmlTokenType.XML_END_TAG_START) {
continue;
}


if (components == null) {
components = VueJsUtil.getLocalFileScopeComponents(containingFile);
}

String componentTag = xmlTag.getName();
if (components.containsKey(componentTag)) {
NavigationGutterIconBuilder<PsiElement> builder = NavigationGutterIconBuilder.create(VueJsIcons.VUE_JS_TOOLBOX)
.setTooltipText("Vue.js Toolbox: Navigate to Vue.js file")
.setTooltipText("Vue.js Toolbox: Navigate to file")
.setTargets(NotNullLazyValue.lazy(new LocalFileComponentTargetSupplier(components, componentTag, psiElement)));

lineMarkerInfos.add(builder.createLineMarkerInfo(psiElement));
Expand Down

0 comments on commit 3ab0600

Please sign in to comment.