Index: gtk/gtktextview.c
===================================================================
--- gtk/gtktextview.c	(revision 17680)
+++ gtk/gtktextview.c	(working copy)
@@ -136,6 +136,7 @@
   MOVE_FOCUS,
   MOVE_VIEWPORT,
   SELECT_ALL,
+  TOGGLE_CURSOR_VISIBLE,
   LAST_SIGNAL
 };
 
@@ -276,6 +277,7 @@
 static void gtk_text_view_copy_clipboard   (GtkTextView           *text_view);
 static void gtk_text_view_paste_clipboard  (GtkTextView           *text_view);
 static void gtk_text_view_toggle_overwrite (GtkTextView           *text_view);
+static void gtk_text_view_toggle_cursor_visible (GtkTextView      *text_view);
 static void gtk_text_view_move_focus       (GtkTextView           *text_view,
                                             GtkDirectionType       direction_type);
 static void gtk_text_view_unselect         (GtkTextView           *text_view);
@@ -825,10 +827,17 @@
 			     G_CALLBACK (gtk_text_view_select_all),
 			     NULL, NULL,
 			     _gtk_marshal_VOID__BOOLEAN,
-			     G_TYPE_NONE, 1,
-			     G_TYPE_BOOLEAN, TRUE);
+			     G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
 
-  
+  signals[TOGGLE_CURSOR_VISIBLE] =
+    _gtk_binding_signal_new (I_("toggle_cursor_visible"),
+			     G_OBJECT_CLASS_TYPE (object_class),
+			     G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+			     G_CALLBACK (gtk_text_view_toggle_cursor_visible),
+			     NULL, NULL,
+			     _gtk_marshal_VOID__VOID,
+			     G_TYPE_NONE, 0);
+
   /*
    * Key bindings
    */
@@ -1005,6 +1014,10 @@
   gtk_binding_entry_add_signal (binding_set, GDK_KP_Insert, 0,
 				"toggle_overwrite", 0);
 
+  /* Caret mode */
+  gtk_binding_entry_add_signal (binding_set, GDK_F7, 0,
+				"toggle_cursor_visible", 0);
+
   /* Control-tab focus motion */
   gtk_binding_entry_add_signal (binding_set, GDK_Tab, GDK_CONTROL_MASK,
 				"move_focus", 1,
@@ -2444,6 +2457,12 @@
   return text_view->tabs ? pango_tab_array_copy (text_view->tabs) : NULL;
 }
 
+static void
+gtk_text_view_toggle_cursor_visible (GtkTextView *text_view)
+{
+  gtk_text_view_set_cursor_visible (!text_view->cursor_visible);
+}
+
 /**
  * gtk_text_view_set_cursor_visible:
  * @text_view: a #GtkTextView
