summaryrefslogtreecommitdiff
path: root/ide-rename-symbol.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-09 12:24:40 -0300
committerpommicket <pommicket@gmail.com>2023-08-09 12:25:33 -0300
commit310faf5d70b8a65c83c013a31ab87d9d3f301767 (patch)
tree9e48b8afad2651de90e6b4e74ac9b96d94968fbd /ide-rename-symbol.c
parent17e65f8dd57762a2e79aeb79a5c0fb69849c07f9 (diff)
new node/buffer system, needs more testing
Diffstat (limited to 'ide-rename-symbol.c')
-rw-r--r--ide-rename-symbol.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/ide-rename-symbol.c b/ide-rename-symbol.c
index 97c16a5..0ff69e8 100644
--- a/ide-rename-symbol.c
+++ b/ide-rename-symbol.c
@@ -207,18 +207,17 @@ void rename_symbol_process_lsp_response(Ted *ted, const LSPResponse *response) {
}
}
done:
-
- // end all edit chains in all buffers
- // they're almost definitely all created by us
- for (u16 i = 0; i < TED_MAX_BUFFERS; ++i) {
- if (ted->buffers_used[i]) {
- TextBuffer *buffer = &ted->buffers[i];
- buffer_end_edit_chain(buffer);
+
+ {
+ // end all edit chains in all buffers
+ // they're almost definitely all created by us
+ arr_foreach_ptr(ted->buffers, TextBufferPtr, pbuffer) {
+ buffer_end_edit_chain(*pbuffer);
}
+
+ ted_save_all(ted);
}
- ted_save_all(ted);
-
cleanup:
rename_symbol_clear(ted);
if (menu_is_open(ted, MENU_RENAME_SYMBOL))