From aa7b0bb1445feeefafdcf47fd639b10500b45c03 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 31 May 2026 21:19:24 +0200 Subject: implemented but disabled block-wise backwards search algorithm * The block-wise search algorithm allows for efficient backwards searches on large files. * On the downside the results are not entirely symmetric to forward searches. It therefore makes sense to still support the old correct but possibly slow algorithm. Since the old algorithm is just a special case of the new one (with a single block stretching the entire search range), you can configure the block size using `8EJ`. * Unfortunately, the new block-wise algorithm won't work due to a bug in GRegex (only in the glib wrapper code). It is therefore disabled for the time being by default and will probably only be enabled once we switch to a new regexp engine. See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/5199 --- src/search.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/search.h') diff --git a/src/search.h b/src/search.h index 9bd62f7..dc6413e 100644 --- a/src/search.h +++ b/src/search.h @@ -20,6 +20,8 @@ #include "parser.h" +extern gsize teco_search_block_size; + void teco_state_control_search_mode(teco_machine_main_t *ctx, GError **error); extern teco_state_t teco_state_search; -- cgit v1.2.3