gtk_tree_path_up is weird.

Thils should fix #241.
This commit is contained in:
Sebastian Ramacher 2012-08-01 00:23:43 +02:00
parent 9ed64ff606
commit 8c21a6116a

View file

@ -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);