[ghex] findrep: Revert to old behaviour for finding next match
- From: Logan Rathbone <larathbone src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ghex] findrep: Revert to old behaviour for finding next match
- Date: Mon, 9 May 2022 17:19:18 +0000 (UTC)
commit 46f34eb33be4b970b41fe4efeccec8e714a81008
Author: Logan Rathbone <poprocks gmail com>
Date: Mon May 9 13:17:45 2022 -0400
findrep: Revert to old behaviour for finding next match
Fixes #47 - not fully decided that this will be the ultimate approach
taken in the long run, but it works well enough unless and until a
better solution is worked out.
src/findreplace.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/findreplace.c b/src/findreplace.c
index bcbc87e..b81c6f0 100644
--- a/src/findreplace.c
+++ b/src/findreplace.c
@@ -75,7 +75,6 @@ typedef struct {
GtkWidget *options_ignore_case;
GtkWidget *options_show_pane;
gboolean found;
- size_t last_found_len;
GCancellable *cancellable;
} FindDialogPrivate;
@@ -294,7 +293,6 @@ find_ready_cb (GObject *source_object,
if (find_data->found)
{
f_priv->found = TRUE;
- f_priv->last_found_len = find_data->found_len;
hex_widget_set_cursor (priv->gh, find_data->offset);
@@ -366,7 +364,7 @@ find_common (FindDialog *self, enum FindDirection direction,
{
find_data->start = f_priv->found == FALSE ?
cursor_pos :
- cursor_pos + f_priv->last_found_len - 1;
+ cursor_pos + 1;
hex_document_find_forward_full_async (doc,
find_data,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]