diff options
author | pommicket <pommicket@gmail.com> | 2023-08-06 22:48:10 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-08-06 22:48:10 -0400 |
commit | 81354f84a463ef782f53358a3a3f9b359ece9a64 (patch) | |
tree | f60ab47ac87d2f7195f19aefef1fa03d69e71e1d /find.c | |
parent | 419d5b17f27b8d3dda1e59c6193f1ad9c3d218f8 (diff) |
rework edit notify
Diffstat (limited to 'find.c')
-rw-r--r-- | find.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -25,6 +25,23 @@ TextBuffer *find_search_buffer(Ted *ted) { return ted->prev_active_buffer; } +static void find_edit_notify(void *context, TextBuffer *buffer, const EditInfo *info) { + (void)context; + Ted *ted = buffer->ted; + if (!ted->find) { + return; + } + if (buffer != find_search_buffer(ted)) + return; + + // TODO: update find result locations +// printf("%s %u\n",buffer_get_path(buffer),info->newlines_inserted); +} + +void find_init(Ted *ted) { + ted_add_edit_notify(ted, find_edit_notify, NULL); +} + static void ted_error_from_pcre2_error(Ted *ted, int err) { char32_t buf[256] = {0}; |