[gtksourceview] snippetbundle: fix max_id calculation



commit 5a67f9bb5513040550979dfe52848e19b91b47cd
Author: Christian Hergert <chergert redhat com>
Date:   Wed Aug 31 17:09:12 2022 -0700

    snippetbundle: fix max_id calculation
    
    We need to increase the identifier by our own max id, not the max id of
    the bundle to be merged.

 gtksourceview/gtksourcesnippetbundle.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/gtksourcesnippetbundle.c b/gtksourceview/gtksourcesnippetbundle.c
index 3d96736b..21e9db88 100644
--- a/gtksourceview/gtksourcesnippetbundle.c
+++ b/gtksourceview/gtksourcesnippetbundle.c
@@ -533,9 +533,9 @@ _gtk_source_snippet_bundle_merge (GtkSourceSnippetBundle *self,
                return;
        }
 
-       for (guint i = 0; i < other->infos->len; i++)
+       for (guint i = 0; i < self->infos->len; i++)
        {
-               const GtkSourceSnippetInfo *info = &g_array_index (other->infos, GtkSourceSnippetInfo, i);
+               const GtkSourceSnippetInfo *info = &g_array_index (self->infos, GtkSourceSnippetInfo, i);
                max_id = MAX (max_id, info->identifier);
        }
 


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