Skip to content

Commit

Permalink
🐛 Fix empty result in hover()
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Oct 22, 2023
1 parent 6ed4556 commit 88836ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/autotools_language_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def hover(params: TextDocumentPositionParams) -> Hover | None:
params.text_document.uri, params.position, True
)
result, _filetype = self.document.get(text, ["", ""])
if _filetype != filetype:
if result == "" or _filetype != filetype:
return None
return Hover(
MarkupContent(MarkupKind.PlainText, result),
Expand Down

0 comments on commit 88836ec

Please sign in to comment.