From a53fa85dabdfc2c47ec0c9e6626ddda2379a8e38 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 25 Jul 2026 02:37:17 +0200 Subject: get rid of teco_qreg_vtable_t::undo_set_integer() It was never required as a separate callback/method, but was kept merely for consistency. Since we now call teco_current_doc_set_dot() in teco_qreg_dot_set_integer(), we'd have to split it up into an "undo" method as well. I decided to get rid of the superfluous Q-Reg method instead. It's quite likely we could get rid of the remaining undo_set_string(), undo_exchange_string() and undo_edit() callbacks as well (TODO). --- src/search.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/search.c') diff --git a/src/search.c b/src/search.c index accee69..844c459 100644 --- a/src/search.c +++ b/src/search.c @@ -105,7 +105,6 @@ teco_state_control_search_mode(teco_machine_main_t *ctx, GError **error) teco_expressions_push(search_mode); } else { if (!teco_expressions_pop_num_calc(&search_mode, teco_num_sign, error) || - !reg->vtable->undo_set_integer(reg, error) || !reg->vtable->set_integer(reg, search_mode, error)) return; } @@ -957,8 +956,7 @@ teco_state_search_process(teco_machine_main_t *ctx, teco_string_t str, gsize new teco_qreg_t *search_reg = teco_qreg_table_find(&teco_qreg_table_globals, "_", 1); g_assert(search_reg != NULL); - if (!search_reg->vtable->undo_set_integer(search_reg, error) || - !search_reg->vtable->set_integer(search_reg, TECO_FAILURE, error)) + if (!search_reg->vtable->set_integer(search_reg, TECO_FAILURE, error)) return FALSE; g_autoptr(teco_machine_qregspec_t) qreg_machine; -- cgit v1.2.3