From aa0b0eb0d7efeb5e5b798ef01a0bd1e62f7c7ab0 Mon Sep 17 00:00:00 2001 From: hoijui Date: Sun, 17 Dec 2017 10:42:59 +0100 Subject: [PATCH] fix GtkSourceSearchFlags values changes values from: 0, 1, 2 to: 1, 2, 4 before, GTK_SOURCE_SEARCH_VISIBLE_ONLY was 0, and as the the enum values are used as bit-field, checking for this bit would always return in _not set_: visible_only = (flags & GTK_SOURCE_SEARCH_VISIBLE_ONLY) != 0; --- src/gtksourceiter.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gtksourceiter.h b/src/gtksourceiter.h index f2a4235..5bc1d56 100644 --- a/src/gtksourceiter.h +++ b/src/gtksourceiter.h @@ -28,9 +28,9 @@ G_BEGIN_DECLS typedef enum { - GTK_SOURCE_SEARCH_VISIBLE_ONLY, - GTK_SOURCE_SEARCH_TEXT_ONLY, - GTK_SOURCE_SEARCH_CASE_INSENSITIVE + GTK_SOURCE_SEARCH_VISIBLE_ONLY = 1, + GTK_SOURCE_SEARCH_TEXT_ONLY = 2, + GTK_SOURCE_SEARCH_CASE_INSENSITIVE = 4 /* Possible future plans: SEARCH_REGEXP */ } GtkSourceSearchFlags;