summaryrefslogtreecommitdiff
path: root/ide-autocomplete.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2024-12-07 20:38:11 -0500
committerpommicket <pommicket@gmail.com>2024-12-07 20:38:11 -0500
commitbbe75ba8c590747e7df7664128afdf96aeb539e2 (patch)
tree40342f0fda4dbfcc02030a25dfe78d973170ab9a /ide-autocomplete.c
parentb74905fcb282603f8afc45cd3f08fa8c28c83d41 (diff)
Better handling of LSP errors
Diffstat (limited to 'ide-autocomplete.c')
-rw-r--r--ide-autocomplete.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ide-autocomplete.c b/ide-autocomplete.c
index 6089818..558b388 100644
--- a/ide-autocomplete.c
+++ b/ide-autocomplete.c
@@ -365,6 +365,11 @@ void autocomplete_process_lsp_response(Ted *ted, const LSPResponse *response) {
assert(0);
return;
}
+ if (!lsp_response_is_error(response)) {
+ autocomplete_close(ted);
+ ted_flash_error_cursor(ted);
+ return;
+ }
TextBuffer *buffer = ted->active_buffer;
if (!buffer)