summaryrefslogtreecommitdiff
path: root/lsp.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-09 21:19:26 -0400
committerpommicket <pommicket@gmail.com>2023-09-09 21:19:26 -0400
commit16fbe87451b0ca3e8fa35fd04e0afbfab368ea65 (patch)
treedcd4c1e37b4a89173e23047f644df94a9ca92399 /lsp.c
parent0dcfd5a4f1fd865c24c01b17b214e1f72e4c06fe (diff)
fix handling of TextEdit[]
i hate microsoft so much
Diffstat (limited to 'lsp.c')
-rw-r--r--lsp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lsp.c b/lsp.c
index 0ab78a8..e8cb630 100644
--- a/lsp.c
+++ b/lsp.c
@@ -159,9 +159,15 @@ void lsp_response_free(LSPResponse *r) {
case LSP_REQUEST_WORKSPACE_SYMBOLS:
arr_free(r->data.workspace_symbols.symbols);
break;
- case LSP_REQUEST_RENAME:
+ case LSP_REQUEST_RENAME: {
+ LSPResponseRename *rename = &r->data.rename;
+ arr_foreach_ptr(rename->changes, LSPWorkspaceChange, c) {
+ if (c->type == LSP_CHANGE_EDITS) {
+ arr_free(c->data.edit.edits);
+ }
+ }
arr_free(r->data.rename.changes);
- break;
+ } break;
case LSP_REQUEST_HIGHLIGHT:
arr_free(r->data.highlight.highlights);
break;