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 b5208cc..c32f984 100644
--- a/ide-rename-symbol.c
+++ b/ide-rename-symbol.c
@@ -152,13 +152,7 @@ void rename_symbol_process_lsp_response(Ted *ted, const LSPResponse *response) {
goto done;
}
-
- const LSPTextEdit *edit = &change_data->edit;
- BufferPos start = buffer_pos_from_lsp(buffer, edit->range.start);
- BufferPos end = buffer_pos_from_lsp(buffer, edit->range.end);
- buffer_delete_chars_between(buffer, start, end);
- buffer_insert_utf8_at_pos(buffer, start, lsp_response_string(response, edit->new_text));
-
+ buffer_apply_lsp_text_edit(buffer, response, &change_data->edit);
}
break;
case LSP_CHANGE_RENAME: {