summaryrefslogtreecommitdiff
path: root/ide-rename-symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'ide-rename-symbol.c')
-rw-r--r--ide-rename-symbol.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/ide-rename-symbol.c b/ide-rename-symbol.c
index ed7483c..b5208cc 100644
--- a/ide-rename-symbol.c
+++ b/ide-rename-symbol.c
@@ -26,7 +26,7 @@ void rename_symbol_at_cursor(Ted *ted, TextBuffer *buffer, const char *new_name)
LSPRequest request = {.type = LSP_REQUEST_RENAME};
LSPRequestRename *data = &request.data.rename;
data->position = buffer_cursor_pos_as_lsp_document_position(buffer);
- data->new_name = str_dup(new_name);
+ data->new_name = lsp_request_add_string(&request, new_name);
rs->request_id = lsp_send_request(lsp, &request);
}
@@ -119,12 +119,6 @@ void rename_symbol_process_lsp_response(Ted *ted, const LSPResponse *response) {
return;
}
- if (response->error) {
- ted_error(ted, "%s", response->error);
- goto cleanup;
-
- }
-
const LSPResponseRename *data = &response->data.rename;
LSP *lsp = ted_get_lsp_by_id(ted, rs->request_id.lsp);
if (!lsp) {