--- ./gtk/gtktreeview.c.orig	2004-06-25 13:41:21.389546264 +0300
+++ ./gtk/gtktreeview.c	2004-06-25 14:11:15.420812056 +0300
@@ -8007,7 +8007,22 @@
 
   if (cursor_path == NULL)
     {
-      cursor_path = gtk_tree_path_new_first ();
+      GtkTreeSelection *selection;
+      GtkTreeModel     *model;
+      GtkTreeIter       iter;
+      gchar            *path_string;
+
+      selection = gtk_tree_view_get_selection (tree_view);
+      if (gtk_tree_selection_get_selected (selection, &model, &iter))
+        {
+          path_string = gtk_tree_model_get_string_from_iter (model, &iter);
+          cursor_path = gtk_tree_path_new_from_string (path_string);
+          g_free (path_string);
+        }
+      else
+        {
+          cursor_path = gtk_tree_path_new_first ();
+        }
       gtk_tree_row_reference_free (tree_view->priv->cursor);
       tree_view->priv->cursor = NULL;
 
