diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-10 10:55:51 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-11 14:50:02 -0500 |
commit | 5bffb50207f8d8ba873f4c40dde4859179153001 (patch) | |
tree | 6d1c574838b94273af4021b0a5453a3948c85887 /find.c | |
parent | 4f2a012a5dbad755bd621a3308a306afd4589fd5 (diff) |
chain replace all into one undo event
Diffstat (limited to 'find.c')
-rw-r--r-- | find.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -272,11 +272,13 @@ static void find_replace_all(Ted *ted) { FindResult *last_result = arr_lastp(ted->find_results); buffer_cursor_move_to_pos(buffer, last_result->start); } + buffer_start_edit_chain(buffer); // NOTE: we don't need to increment i because the matches will be removed from the find_results array. for (u32 i = match_idx; i < arr_len(ted->find_results); ) { if (!find_replace_match(ted, i)) break; } + buffer_end_edit_chain(buffer); find_update(ted, true); } } |