summaryrefslogtreecommitdiff
path: root/ide-rename-symbol.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 /ide-rename-symbol.c
parent0dcfd5a4f1fd865c24c01b17b214e1f72e4c06fe (diff)
fix handling of TextEdit[]
i hate microsoft so much
Diffstat (limited to 'ide-rename-symbol.c')
-rw-r--r--ide-rename-symbol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ide-rename-symbol.c b/ide-rename-symbol.c
index c32f984..53a6467 100644
--- a/ide-rename-symbol.c
+++ b/ide-rename-symbol.c
@@ -136,7 +136,7 @@ void rename_symbol_process_lsp_response(Ted *ted, const LSPResponse *response) {
arr_foreach_ptr(data->changes, const LSPWorkspaceChange, change) {
switch (change->type) {
- case LSP_CHANGE_EDIT: {
+ case LSP_CHANGE_EDITS: {
const LSPWorkspaceChangeEdit *change_data = &change->data.edit;
const char *path = lsp_document_path(lsp, change_data->document);
if (!ted_open_file(ted, path)) goto done;
@@ -152,7 +152,7 @@ void rename_symbol_process_lsp_response(Ted *ted, const LSPResponse *response) {
goto done;
}
- buffer_apply_lsp_text_edit(buffer, response, &change_data->edit);
+ buffer_apply_lsp_text_edits(buffer, response, change_data->edits, arr_len(change_data->edits));
}
break;
case LSP_CHANGE_RENAME: {