From 232862a14702a2743071ee117f7f4b32af5cae35 Mon Sep 17 00:00:00 2001 From: Giuseppe Penone Date: Wed, 3 Apr 2024 22:10:40 +0100 Subject: [PATCH] fixed regression issue with search --- src/ct/ct_actions_find.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ct/ct_actions_find.cc b/src/ct/ct_actions_find.cc index de60fac73..47a708873 100644 --- a/src/ct/ct_actions_find.cc +++ b/src/ct/ct_actions_find.cc @@ -633,7 +633,7 @@ bool CtActions::_find_pattern(CtTreeIter tree_iter, const gint64 node_id = tree_iter.get_node_id(); const int start_offset = start_iter.get_offset(); const int num_objs_before_start = _get_num_objs_before_offset(text_buffer, start_offset); - const int position_fw_start_or_bw_end = std::max(0, str::symb_pos_to_byte_pos(text, start_offset - num_objs_before_start)); + const int position_fw_start_or_bw_end = str::symb_pos_to_byte_pos(text, std::max(0, start_offset - num_objs_before_start)); std::pair match_offsets{-1, -1}; if (forward) { Glib::MatchInfo match_info;