[gtksourceview/wip/regex-search] SearchContext: better organize the private struct
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/regex-search] SearchContext: better organize the private struct
- Date: Tue, 30 Jul 2013 14:40:02 +0000 (UTC)
commit 544fc35907c829c0cca781e9391ff035d66283fb
Author: Sébastien Wilmet <swilmet gnome org>
Date: Tue Jul 30 15:24:06 2013 +0200
SearchContext: better organize the private struct
gtksourceview/gtksourcesearchcontext.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/gtksourceview/gtksourcesearchcontext.c b/gtksourceview/gtksourcesearchcontext.c
index 3a43018..a685986 100644
--- a/gtksourceview/gtksourcesearchcontext.c
+++ b/gtksourceview/gtksourcesearchcontext.c
@@ -196,6 +196,12 @@ enum
struct _GtkSourceSearchContextPrivate
{
GtkTextBuffer *buffer;
+ GtkSourceSearchSettings *settings;
+
+ /* The tag to apply to search occurrences. Even if the highlighting is
+ * disabled, the tag is applied.
+ */
+ GtkTextTag *found_tag;
/* The region to scan and highlight. If NULL, the scan is finished. */
GtkTextRegion *scan_region;
@@ -211,16 +217,16 @@ struct _GtkSourceSearchContextPrivate
GTask *task;
GtkTextRegion *task_region;
- gulong idle_scan_id;
-
- gint occurrences_count;
-
- GtkTextTag *found_tag;
-
- GtkSourceSearchSettings *settings;
+ /* If the regex search is disabled, text_nb_lines is the number of lines
+ * of the search text. It is useful to adjust the region to scan.
+ */
gint text_nb_lines;
+
GRegex *regex;
GError *regex_error;
+
+ gint occurrences_count;
+ gulong idle_scan_id;
};
/* Data for the asynchronous forward and backward search tasks. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]