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-rename-symbol.c | |
parent | 7b8b4d4495164250c71582347dd0338d387c4e98 (diff) |
use LSPString in requests too for consistency
Diffstat (limited to 'ide-rename-symbol.c')
-rw-r--r-- | ide-rename-symbol.c | 8 |
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) { |