Skip to content

Commit

Permalink
Fix pair tag hover length
Browse files Browse the repository at this point in the history
  • Loading branch information
Rixafy committed Apr 27, 2024
1 parent 1d2c04f commit d7eb569
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,10 @@ public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNu
return PsiReference.EMPTY_ARRAY;
}

int offset = 1;
int length = element instanceof LatteMacroCloseTag ? 1 : 0;

return new PsiReference[]{new LatteMacroTagReference((LatteMacroTag) element, new TextRange(1 + length, valueLength + 2))};
return new PsiReference[]{new LatteMacroTagReference((LatteMacroTag) element, new TextRange(offset + length, offset + valueLength + length))};
}
});

Expand Down

0 comments on commit d7eb569

Please sign in to comment.