Skip to content

Commit

Permalink
fix: ensure LSPTextHover.generateDoc ignores elements from different …
Browse files Browse the repository at this point in the history
…files

Signed-off-by: Fred Bricon <[email protected]>
  • Loading branch information
fbricon authored and angelozerr committed Jun 16, 2023
1 parent 59ab99b commit f36bc3c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ public String getQuickNavigateInfo(PsiElement element, PsiElement originalElemen
@Nullable
@Override
public String generateDoc(PsiElement element, @Nullable PsiElement originalElement) {
if (originalElement == null || !Objects.equals(element.getContainingFile(), originalElement.getContainingFile())) {
return null;
}
Editor editor = LSPIJUtils.editorForElement(element);
if (editor == null) {
return null;
Expand Down

0 comments on commit f36bc3c

Please sign in to comment.