[gtksourceview/wip/chergert/snippets] clear tags when cursor leaves snippet chunk



commit 6f4c8505847b83459f9d558a655cb4355bdccabc
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jan 28 17:45:33 2020 -0800

    clear tags when cursor leaves snippet chunk

 gtksourceview/gtksourceview-snippets.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtksourceview/gtksourceview-snippets.c b/gtksourceview/gtksourceview-snippets.c
index 1ef930ee..e01f77aa 100644
--- a/gtksourceview/gtksourceview-snippets.c
+++ b/gtksourceview/gtksourceview-snippets.c
@@ -196,7 +196,10 @@ buffer_cursor_moved_cb (GtkSourceBuffer       *buffer,
                while (snippet != NULL &&
                       !_gtk_source_snippet_insert_set (snippet, insert))
                {
-                       g_object_unref (g_queue_pop_head (&snippets->queue));
+                       snippet = g_queue_pop_head (&snippets->queue);
+                       _gtk_source_snippet_finish (snippet);
+                       g_object_unref (snippet);
+
                        snippet = g_queue_peek_head (&snippets->queue);
                }
        }


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