summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-07 16:09:30 -0500
committerpommicket <pommicket@gmail.com>2023-01-07 16:09:30 -0500
commit66da8ac5dcfe02d3aa79f72ba415235eb872ec1d (patch)
tree651dbbeabf79f70b84f6e1c4394ebd703837737c /ted.c
parent7640ecce499fc49cad3d9b9f391cce0b74e435c9 (diff)
better request cancellation system
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ted.c b/ted.c
index ae1908b..e7f3098 100644
--- a/ted.c
+++ b/ted.c
@@ -637,11 +637,12 @@ void ted_go_to_lsp_document_position(Ted *ted, LSP *lsp, LSPDocumentPosition pos
ted_go_to_position(ted, path, line, character, true);
}
-void ted_cancel_lsp_request(Ted *ted, LSPID lsp, LSPRequestID request) {
+void ted_cancel_lsp_request(Ted *ted, LSPServerRequestID *request) {
if (!request) return;
- LSP *lsp_obj = ted_get_lsp_by_id(ted, lsp);
+ LSP *lsp_obj = ted_get_lsp_by_id(ted, request->lsp);
if (!lsp_obj) return;
- lsp_cancel_request(lsp_obj, request);
+ lsp_cancel_request(lsp_obj, request->id);
+ memset(request, 0, sizeof *request);
}