[gtksourceview] completionlist: always clear comments cell



commit 352d73cde2653395fa6bd3f4376dcad35efe9285
Author: Christian Hergert <chergert redhat com>
Date:   Thu Sep 1 09:37:18 2022 -0700

    completionlist: always clear comments cell
    
    Otherwise we risk providers potentially not filling in the data for the
    next rendering.

 gtksourceview/gtksourcecompletionlist.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletionlist.c b/gtksourceview/gtksourcecompletionlist.c
index af1dbfd2..2bd308ef 100644
--- a/gtksourceview/gtksourcecompletionlist.c
+++ b/gtksourceview/gtksourcecompletionlist.c
@@ -170,6 +170,8 @@ _gtk_source_completion_list_update_comment (GtkSourceCompletionList *self)
                info = _gtk_source_completion_info_get_cell (self->info);
        }
 
+        gtk_source_completion_cell_set_widget (self->comments, NULL);
+
        if (_gtk_source_completion_list_box_get_selected (self->listbox, &provider, &proposal))
        {
                gtk_source_completion_provider_display (provider, self->context, proposal, self->comments);
@@ -181,8 +183,6 @@ _gtk_source_completion_list_update_comment (GtkSourceCompletionList *self)
        }
        else
        {
-               gtk_source_completion_cell_set_widget (self->comments, NULL);
-
                if (info != NULL)
                {
                        gtk_source_completion_cell_set_widget (info, NULL);


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