[gtksourceview] pcre2: allow matching at final position



commit bf870ac02f3dbbc499a740ab9c99501d173b13b5
Author: Christian Hergert <chergert redhat com>
Date:   Thu Oct 1 17:00:43 2020 -0700

    pcre2: allow matching at final position
    
    This is necessary so that you can match with things like ((?-ix)$) at a
    known position.
    
    Fixes the ability to end shebang contexts.

 gtksourceview/implregex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtksourceview/implregex.c b/gtksourceview/implregex.c
index 04f5389b..70ab2eee 100644
--- a/gtksourceview/implregex.c
+++ b/gtksourceview/implregex.c
@@ -525,7 +525,7 @@ impl_match_info_next (ImplMatchInfo  *match_info,
 again:
        match_info->n_groups = -1;
 
-       if (match_info->start_pos >= match_info->string_len)
+       if (match_info->start_pos > match_info->string_len)
        {
                return FALSE;
        }


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