From 8c21a6116a110e8c7a677cc9f47ef575c153cded Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Wed, 1 Aug 2012 00:23:43 +0200 Subject: [PATCH] gtk_tree_path_up is weird. Thils should fix #241. --- shortcuts.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shortcuts.c b/shortcuts.c index dc57d91..39f03f9 100644 --- a/shortcuts.c +++ b/shortcuts.c @@ -724,7 +724,9 @@ sc_navigate_index(girara_session_t* session, girara_argument_t* argument, switch(argument->n) { case UP: if (gtk_tree_path_prev(path) == FALSE) { - is_valid_path = gtk_tree_path_up(path); + /* For some reason gtk_tree_path_up returns TRUE although we're not + * moving anywhere. */ + is_valid_path = gtk_tree_path_up(path) && (gtk_tree_path_get_depth(path) > 0); } else { /* row above */ while(gtk_tree_view_row_expanded(tree_view, path)) { gtk_tree_model_get_iter(model, &iter, path);