[gtk/matthiasc/for-master] listbase: Fix an off-by-one error



commit facfff0022ffb46e6c09d815521c76532030e85b
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 6 00:15:50 2020 -0400

    listbase: Fix an off-by-one error
    
    We were accidentally cutting off the set one-too-early,
    which showed up as single clicks not selecting an item
    anymore.

 gtk/gtklistbase.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtklistbase.c b/gtk/gtklistbase.c
index 936b874ac5..250e7b3619 100644
--- a/gtk/gtklistbase.c
+++ b/gtk/gtklistbase.c
@@ -1355,7 +1355,7 @@ range_cb (guint     position,
 {
   GtkSet *set = data;
 
-  gtk_set_find_range (set, position, gtk_set_get_max (set), start, n_items, selected);
+  gtk_set_find_range (set, position, gtk_set_get_max (set) + 1, start, n_items, selected);
 }
 
 static void


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