[gtksourceview/wip/chergert/gsv-gtk4] completion: make priorities match previous completion providers



commit d721ddef96e9d530cf92e802cea5fd169dccfbe1
Author: Christian Hergert <chergert redhat com>
Date:   Sun Aug 30 14:47:01 2020 -0700

    completion: make priorities match previous completion providers

 gtksourceview/gtksourcecompletioncontext.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletioncontext.c b/gtksourceview/gtksourcecompletioncontext.c
index 78c211821..9f9dc27e7 100644
--- a/gtksourceview/gtksourcecompletioncontext.c
+++ b/gtksourceview/gtksourcecompletioncontext.c
@@ -103,9 +103,9 @@ compare_provider_info (gconstpointer a,
        int priority_a = gtk_source_completion_provider_get_priority (info_a->provider, self);
        int priority_b = gtk_source_completion_provider_get_priority (info_b->provider, self);
 
-       if (priority_a < priority_b)
+       if (priority_a > priority_b)
                return -1;
-       else if (priority_a > priority_b)
+       else if (priority_a < priority_b)
                return 1;
        else
                return 0;


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