From bbe75ba8c590747e7df7664128afdf96aeb539e2 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sat, 7 Dec 2024 20:38:11 -0500 Subject: Better handling of LSP errors --- ide-signature-help.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ide-signature-help.c') diff --git a/ide-signature-help.c b/ide-signature-help.c index 90853e6..ea47e1d 100644 --- a/ide-signature-help.c +++ b/ide-signature-help.c @@ -96,6 +96,10 @@ void signature_help_process_lsp_response(Ted *ted, const LSPResponse *response) return; } help->last_request.id = 0; + if (lsp_response_is_error(response)) { + signature_help_clear(help); + return; + } const LSPResponseSignatureHelp *lsp_help = &response->data.signature_help; u32 signature_count = arr_len(lsp_help->signatures); -- cgit v1.2.3