--- gtktreeview.orig.c	2005-04-08 12:53:44.000000000 +0000
+++ gtktreeview.c	2005-05-03 14:30:12.000000000 +0000
@@ -8540,7 +8540,6 @@
   GtkTreeViewColumn *column;
   GtkTreeIter iter;
   GList *list;
-  gboolean found_column = FALSE;
   gboolean rtl;
 
   rtl = (gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL);
@@ -8563,51 +8562,50 @@
     }
   gtk_tree_path_free (cursor_path);
 
-  list = tree_view->priv->columns;
+  /* search current focus column */
   if (tree_view->priv->focus_column)
-    {
-      for (list = tree_view->priv->columns; list; list = list->next)
-	{
-	  if (list->data == tree_view->priv->focus_column)
-	    break;
-	}
-    }
+    if ((list = g_list_find(tree_view->priv->columns, tree_view->priv->focus_column)))
+      /* do an initial step */
+      if (count == 1)
+	list = rtl ? list->prev : list->next;
+      else
+	list = rtl ? list->next : list->prev;
+    else
+      list = tree_view->priv->columns;
+  else
+    list = tree_view->priv->columns;
 
+  /* find focusable column */
   while (list)
     {
       column = list->data;
-      if (column->visible == FALSE)
-	goto loop_end;
-
-      gtk_tree_view_column_cell_set_cell_data (column,
-					       tree_view->priv->model,
-					       &iter,
-					       GTK_RBNODE_FLAG_SET (cursor_node, GTK_RBNODE_IS_PARENT),
-					       cursor_node->children?TRUE:FALSE);
-      if (_gtk_tree_view_column_cell_focus (column, count,
-					    list->prev?TRUE:FALSE,
-					    list->next?TRUE:FALSE))
-	{
-	  tree_view->priv->focus_column = column;
-	  found_column = TRUE;
-	  break;
+      if (column->visible)
+        {
+	  gtk_tree_view_column_cell_set_cell_data (column,
+						   tree_view->priv->model,
+						   &iter,
+						   GTK_RBNODE_FLAG_SET (cursor_node, GTK_RBNODE_IS_PARENT),
+						   cursor_node->children?TRUE:FALSE);
+	  if (_gtk_tree_view_column_cell_focus (column, count,
+						list->prev?TRUE:FALSE,
+						list->next?TRUE:FALSE))
+	    {
+	      tree_view->priv->focus_column = column;
+	      if (!gtk_tree_view_has_special_cell (tree_view))
+		_gtk_tree_view_queue_draw_node (tree_view,
+						cursor_tree,
+						cursor_node,
+						NULL);
+	      g_signal_emit (tree_view, tree_view_signals[CURSOR_CHANGED], 0);
+	      break;
+	    }
 	}
-    loop_end:
       if (count == 1)
 	list = rtl ? list->prev : list->next;
       else
 	list = rtl ? list->next : list->prev;
     }
-
-  if (found_column)
-    {
-      if (!gtk_tree_view_has_special_cell (tree_view))
-	_gtk_tree_view_queue_draw_node (tree_view,
-				        cursor_tree,
-				        cursor_node,
-				        NULL);
-      g_signal_emit (tree_view, tree_view_signals[CURSOR_CHANGED], 0);
-    }
   gtk_tree_view_clamp_column_visible (tree_view, tree_view->priv->focus_column);
 }
 
@@ -11203,6 +11201,7 @@
     {
       g_return_if_fail (focus_column);
       g_return_if_fail (GTK_IS_CELL_RENDERER (focus_cell));
+      g_return_if_fail (focus_cell->mode!=GTK_CELL_RENDERER_MODE_INERT);
     }
 
   /* cancel the current editing, if it exists */
--- gtktreeviewcolumn.orig.c	2005-04-07 05:09:33.000000000 +0000
+++ gtktreeviewcolumn.c	2005-05-03 14:27:54.000000000 +0000 
@@ -3299,7 +3306,6 @@
 
 	  next = gtk_tree_view_column_cell_next (tree_column, list);
 	  prev = gtk_tree_view_column_cell_prev (tree_column, list);
-
 	  info->has_focus = FALSE;
 	  if (direction > 0 && next)
 	    {
@@ -3350,8 +3356,11 @@
 	((GtkTreeViewColumnCellInfo *)gtk_tree_view_column_cell_first (tree_column)->data)->has_focus = TRUE;
       else if (direction < 0)
 	((GtkTreeViewColumnCellInfo *)gtk_tree_view_column_cell_last (tree_column)->data)->has_focus = TRUE;
+      return TRUE;
     }
-  return TRUE;
+  else if (count ==1)
+    return TRUE;
+  return FALSE;
 }
 
 void
