diff options
author | pommicket <pommicket@gmail.com> | 2023-09-07 14:06:16 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-09-07 14:06:16 -0400 |
commit | bb4b7774aabc2686f936935b02899b1aa0bf1f2b (patch) | |
tree | d218d61e8163bf2e7cbdc352ab86744e8f250be8 /ide-definitions.c | |
parent | 7b8b4d4495164250c71582347dd0338d387c4e98 (diff) |
use LSPString in requests too for consistency
Diffstat (limited to 'ide-definitions.c')
-rw-r--r-- | ide-definitions.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ide-definitions.c b/ide-definitions.c index aab145a..79677e8 100644 --- a/ide-definitions.c +++ b/ide-definitions.c @@ -240,9 +240,8 @@ void definitions_send_request_if_needed(Ted *ted) { } LSPRequest request = {.type = LSP_REQUEST_WORKSPACE_SYMBOLS}; LSPRequestWorkspaceSymbols *syms = &request.data.workspace_symbols; - syms->query = str_dup(query); - // cancel old request - definition_cancel_lookup(ted); + syms->query = lsp_request_add_string(&request, query); + definition_cancel_lookup(ted); // cancel old request defs->last_request = lsp_send_request(lsp, &request); defs->last_request_time = ted->frame_time; free(defs->last_request_query); |