[gtksourceview] vim: dont add a ref for timeout source



commit 59c28189e9d19d59d46235b40d2c6ef98f1c7419
Author: Christian Hergert <chergert redhat com>
Date:   Fri Nov 12 12:50:07 2021 -0800

    vim: dont add a ref for timeout source
    
    We don't want to take additional refs because it can break our tests which
    want to see things processed immediately.
    
    Additionally, we already handle the lifecycle tracking anyway.

 gtksourceview/vim/gtksourcevim.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gtksourceview/vim/gtksourcevim.c b/gtksourceview/vim/gtksourcevim.c
index ea59b8c8..51113ce1 100644
--- a/gtksourceview/vim/gtksourcevim.c
+++ b/gtksourceview/vim/gtksourcevim.c
@@ -171,11 +171,8 @@ on_cursor_moved_cb (GtkSourceVim    *self,
        if (self->constrain_insert_source == 0)
        {
                self->constrain_insert_source =
-                       g_timeout_add_full (G_PRIORITY_LOW,
-                                           35,
-                                           constrain_insert_source,
-                                           g_object_ref (self),
-                                           g_object_unref);
+                       g_timeout_add_full (G_PRIORITY_LOW, 35,
+                                           constrain_insert_source, self, NULL);
        }
 }
 


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