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-definitions.c | |
parent | b74905fcb282603f8afc45cd3f08fa8c28c83d41 (diff) |
Better handling of LSP errors
Diffstat (limited to 'ide-definitions.c')
-rw-r--r-- | ide-definitions.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ide-definitions.c b/ide-definitions.c index 79677e8..8b895db 100644 --- a/ide-definitions.c +++ b/ide-definitions.c @@ -156,6 +156,13 @@ void definitions_process_lsp_response(Ted *ted, LSP *lsp, const LSPResponse *res } defs->last_request.id = 0; + if (lsp_response_is_error(response)) { + if (menu_is_open(ted, MENU_GOTO_DEFINITION)) { + menu_close(ted); + } + ted_flash_error_cursor(ted); + return; + } switch (response->request.type) { case LSP_REQUEST_DEFINITION: |