diff options
author | pommicket <pommicket@gmail.com> | 2023-01-07 16:09:30 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-01-07 16:09:30 -0500 |
commit | 66da8ac5dcfe02d3aa79f72ba415235eb872ec1d (patch) | |
tree | 651dbbeabf79f70b84f6e1c4394ebd703837737c /ted.c | |
parent | 7640ecce499fc49cad3d9b9f391cce0b74e435c9 (diff) |
better request cancellation system
Diffstat (limited to 'ted.c')
-rw-r--r-- | ted.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); } |