summaryrefslogtreecommitdiff
path: root/lsp.c
diff options
context:
space:
mode:
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;