[gtksourceview] implregex: start at 0 position



commit eba7fb550837f4e18a3c77b0b8b239edac95294b
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jul 2 14:29:02 2021 -0700

    implregex: start at 0 position
    
    -1 should be used to indicate we exhausted the regex.

 gtksourceview/implregex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtksourceview/implregex.c b/gtksourceview/implregex.c
index 0e45a61d..d018ea07 100644
--- a/gtksourceview/implregex.c
+++ b/gtksourceview/implregex.c
@@ -291,7 +291,7 @@ impl_match_info_new (ImplRegex        *regex,
        match_info = g_slice_new0 (ImplMatchInfo);
        match_info->regex = impl_regex_ref (regex);
        match_info->match_flags = regex->match_flags | translate_match_flags (match_options);
-       match_info->start_pos = -1;
+       match_info->start_pos = 0;
        match_info->matches = -1;
        match_info->string = string;
        match_info->string_len = string_len;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]