From 33ac8b2c333c2d6b6637873d1a84605ef3354706 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Fri, 1 Jul 2011 13:43:16 +0200 Subject: [PATCH] Fix index navigation issues (Closes: #40). Thanks to Serge Guelton for the patch. --- zathura.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zathura.c b/zathura.c index 6a41ddf..71180aa 100644 --- a/zathura.c +++ b/zathura.c @@ -2428,7 +2428,7 @@ sc_navigate_index(Argument* argument) { case UP: if(!gtk_tree_path_prev(path)) - is_valid_path = gtk_tree_path_up(path); + is_valid_path = (gtk_tree_path_get_depth(path) > 1) && gtk_tree_path_up(path) ; else /* row above */ { while(gtk_tree_view_row_expanded(treeview, path)) { @@ -2476,7 +2476,7 @@ sc_navigate_index(Argument* argument) return; } - if (is_valid_path) + if (is_valid_path ) gtk_tree_view_set_cursor(treeview, path, NULL, FALSE); gtk_tree_path_free(path);