summaryrefslogtreecommitdiff
path: root/lsp-parse.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-07 11:57:07 -0500
committerpommicket <pommicket@gmail.com>2023-01-07 11:57:07 -0500
commit57c015b9c87312ae3cc3624e707b86e89618fbfd (patch)
tree93224710a58edc69dd57f30b729a67938f896f78 /lsp-parse.c
parentda5a197ea3d6ac8333cb020080205cfd1af530c1 (diff)
oops turns out Hover.range is optional
Diffstat (limited to 'lsp-parse.c')
-rw-r--r--lsp-parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lsp-parse.c b/lsp-parse.c
index 8c914fa..56a980d 100644
--- a/lsp-parse.c
+++ b/lsp-parse.c
@@ -495,7 +495,8 @@ static bool parse_hover(LSP *lsp, const JSON *json, LSPResponse *response) {
JSONObject result = json_force_object(result_value);
JSONValue range = json_object_get(json, result, "range");
- parse_range(lsp, json, range, &hover->range);
+ if (range.type != JSON_UNDEFINED)
+ parse_range(lsp, json, range, &hover->range);
JSONValue contents = json_object_get(json, result, "contents");