Do not try to expand a childless folderview row on right arrow keypress.
authorAndrej Kacian <andrej@kacian.sk>
Wed, 21 Oct 2015 09:33:04 +0000 (11:33 +0200)
committerAndrej Kacian <andrej@kacian.sk>
Wed, 21 Oct 2015 09:33:04 +0000 (11:33 +0200)
src/folderview.c

index 3336d94..965cf45 100644 (file)
@@ -2006,7 +2006,8 @@ static gboolean folderview_key_pressed(GtkWidget *widget, GdkEventKey *event,
        switch (event->keyval) {
        case GDK_KEY_Right:
                if (folderview->selected) {
-                       if (!GTK_CMCTREE_ROW(folderview->selected)->expanded)
+                       if (GTK_CMCTREE_ROW(folderview->selected)->children != NULL
+                                       && !GTK_CMCTREE_ROW(folderview->selected)->expanded)
                                gtk_cmctree_expand(GTK_CMCTREE(folderview->ctree),
                                                folderview->selected);
                        else