diff options
author | pommicket <pommicket@gmail.com> | 2024-12-07 20:38:11 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2024-12-07 20:38:11 -0500 |
commit | bbe75ba8c590747e7df7664128afdf96aeb539e2 (patch) | |
tree | 40342f0fda4dbfcc02030a25dfe78d973170ab9a /ide-usages.c | |
parent | b74905fcb282603f8afc45cd3f08fa8c28c83d41 (diff) |
Better handling of LSP errors
Diffstat (limited to 'ide-usages.c')
-rw-r--r-- | ide-usages.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ide-usages.c b/ide-usages.c index 9ae31e4..b94eb45 100644 --- a/ide-usages.c +++ b/ide-usages.c @@ -44,6 +44,11 @@ void usages_process_lsp_response(Ted *ted, const LSPResponse *response) { return; // not for us if (response->request.id != usages->last_request.id) return; + if (lsp_response_is_error(response)) { + usages->last_request.id = 0; + ted_flash_error_cursor(ted); + return; + } LSP *lsp = ted_get_lsp_by_id(ted, usages->last_request.lsp); const LSPResponseReferences *refs = &response->data.references; if (lsp && arr_len(refs->locations)) { |