--- gtk+-2.4.14/gtk/gtktreeview.c	2004-10-24 06:21:57.000000000 +0530
+++ gtk+-2.4.14-new/gtk/gtktreeview.c	2005-04-07 16:45:50.154915496 +0530
@@ -8076,14 +8076,20 @@ gtk_tree_view_focus_to_cursor (GtkTreeVi
 
   cursor_path = NULL;
   if (tree_view->priv->cursor)
-    cursor_path = gtk_tree_row_reference_get_path (tree_view->priv->cursor);
+    {
+      cursor_path = gtk_tree_row_reference_get_path (tree_view->priv->cursor);
 
+      /* Clamp to the node which had the last focus, without altering the selection.*/
+      if (cursor_path != NULL)
+	gtk_tree_view_real_set_cursor (tree_view, cursor_path, FALSE, TRUE);
+    }
   if (cursor_path == NULL)
     {
       /* Consult the selection before defaulting to the first element */
       GtkTreeSelection *selection;
       GtkTreeModel     *model;
       GList            *selected_rows;
+      gboolean         default_to_first = FALSE;
 
       selection = gtk_tree_view_get_selection (tree_view);
       selected_rows = gtk_tree_selection_get_selected_rows (selection, &model);
@@ -8094,12 +8100,16 @@ gtk_tree_view_focus_to_cursor (GtkTreeVi
 	  g_list_free (selected_rows);
         }
       else
-	cursor_path = gtk_tree_path_new_first ();
+	{
+	  cursor_path = gtk_tree_path_new_first ();
+	  default_to_first = TRUE;
+	}
 
       gtk_tree_row_reference_free (tree_view->priv->cursor);
       tree_view->priv->cursor = NULL;
 
-      if (tree_view->priv->selection->type == GTK_SELECTION_MULTIPLE)
+      /* If you are defaulting to first node then select it */
+      if (tree_view->priv->selection->type == GTK_SELECTION_MULTIPLE && !default_to_first)
 	gtk_tree_view_real_set_cursor (tree_view, cursor_path, FALSE, FALSE);
       else
 	gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE, FALSE);
