Index: src/terminal-accels.c
===================================================================
--- src/terminal-accels.c	(revision 3436)
+++ src/terminal-accels.c	(working copy)
@@ -50,6 +50,7 @@
 #define ACCEL_PATH_NEW_TAB              ACCEL_PATH_ROOT "FileNewTab"
 #define ACCEL_PATH_NEW_WINDOW           ACCEL_PATH_ROOT "FileNewWindow"
 #define ACCEL_PATH_NEW_PROFILE          ACCEL_PATH_ROOT "FileNewProfile"
+#define ACCEL_PATH_SAVE_TERM_TEXT       ACCEL_PATH_ROOT "FileSaveTermText"
 #define ACCEL_PATH_CLOSE_TAB            ACCEL_PATH_ROOT "FileCloseTab"
 #define ACCEL_PATH_CLOSE_WINDOW         ACCEL_PATH_ROOT "FileCloseWindow"
 #define ACCEL_PATH_COPY                 ACCEL_PATH_ROOT "EditCopy"
@@ -86,6 +87,7 @@
 #define KEY_PREV_TAB            CONF_KEYS_PREFIX "/prev_tab"
 #define KEY_RESET_AND_CLEAR     CONF_KEYS_PREFIX "/reset_and_clear"
 #define KEY_RESET               CONF_KEYS_PREFIX "/reset"
+#define KEY_SAVE_TERM_TEXT      CONF_KEYS_PREFIX "/save_term_text"
 #define KEY_SET_TERMINAL_TITLE  CONF_KEYS_PREFIX "/set_window_title"
 #define KEY_TOGGLE_MENUBAR      CONF_KEYS_PREFIX "/toggle_menubar"
 #define KEY_ZOOM_IN             CONF_KEYS_PREFIX "/zoom_in"
@@ -122,6 +124,8 @@
     KEY_NEW_WINDOW, ACCEL_PATH_NEW_WINDOW, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_n, NULL, FALSE, TRUE },
   { N_("New Profile"),
     KEY_NEW_PROFILE, ACCEL_PATH_NEW_PROFILE, 0, 0, NULL, FALSE, TRUE },
+  { N_("Save Terminal Text"),
+    KEY_SAVE_TERM_TEXT, ACCEL_PATH_SAVE_TERM_TEXT, 0, 0, NULL, FALSE },
   { N_("Close Tab"),
     KEY_CLOSE_TAB, ACCEL_PATH_CLOSE_TAB, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_w, NULL, FALSE, TRUE },
   { N_("Close Window"),
Index: src/terminal-util.c
===================================================================
--- src/terminal-util.c	(revision 3436)
+++ src/terminal-util.c	(working copy)
@@ -123,7 +123,53 @@
   return gtk_show_uri (screen, uri, user_time, error);
 }
 
+static gboolean
+vte_terminal_always_selected (VteTerminal *terminal, glong row, glong column, gpointer data)
+{
+  return TRUE;
+}
+
 void
+terminal_util_save_term_text_cb (GtkDialog *dialog, gint response_id, gpointer terminal)
+{
+  GArray *array;
+  glong row, col;
+  char* terminal_text;
+  gchar *filename_uri = NULL;
+  GFile *file;
+  GFileOutputStream *stream;
+
+  filename_uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (dialog));
+
+  gtk_widget_destroy (GTK_WIDGET (dialog));
+
+  if (filename_uri == NULL)
+      return;
+
+  array = g_array_new(FALSE, TRUE, sizeof(struct _VteCharAttributes));
+  vte_terminal_get_cursor_position (VTE_TERMINAL (terminal), &col, &row);
+  col = vte_terminal_get_column_count (VTE_TERMINAL (terminal));
+
+  terminal_text = vte_terminal_get_text_range (VTE_TERMINAL (terminal),
+      0, 0,
+      row, col,
+      vte_terminal_always_selected,
+      NULL,
+      array);
+
+  file = g_file_new_for_uri (filename_uri);
+  stream = g_file_replace (file, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL);
+  
+  if (stream != NULL)
+    g_output_stream_write (G_OUTPUT_STREAM (stream), terminal_text, strlen (terminal_text), NULL, NULL);
+  else
+    g_warning ("Could not write: %s\n", filename_uri);
+
+  g_free(filename_uri);
+  g_free(terminal_text);
+}
+
+void
 terminal_util_show_help (const char *topic, 
                          GtkWindow  *parent)
 {
Index: src/terminal-util.h
===================================================================
--- src/terminal-util.h	(revision 3436)
+++ src/terminal-util.h	(working copy)
@@ -45,6 +45,9 @@
                              TerminalURLFlavour flavor,
                              guint32 user_time);
 
+void terminal_util_save_term_text_cb (GtkDialog *dialog,
+                                      gint response_id,
+                                      gpointer terminal);
 
 void terminal_util_transform_uris_to_quoted_fuse_paths (char **uris);
 
Index: src/terminal-window.c
===================================================================
--- src/terminal-window.c	(revision 3436)
+++ src/terminal-window.c	(working copy)
@@ -131,6 +131,8 @@
                                                TerminalWindow *window);
 static void file_close_window_callback        (GtkAction *action,
                                                TerminalWindow *window);
+static void file_save_term_text_callback      (GtkAction *action,
+                                               TerminalWindow *window);
 static void file_close_tab_callback           (GtkAction *action,
                                                TerminalWindow *window);
 static void edit_copy_callback                (GtkAction *action,
@@ -1598,6 +1600,9 @@
       { "FileNewProfile", GTK_STOCK_OPEN, N_("New _Profile…"), "",
         NULL,
         G_CALLBACK (file_new_profile_callback) },
+      { "FileSaveTermText", GTK_STOCK_SAVE, N_("Save Terminal Text"), "",
+        NULL,
+        G_CALLBACK (file_save_term_text_callback) },
       { "FileCloseTab", GTK_STOCK_CLOSE, N_("C_lose Tab"), "<shift><control>W",
         NULL,
         G_CALLBACK (file_close_tab_callback) },
@@ -2974,6 +2979,36 @@
 }
 
 static void
+file_save_term_text_callback (GtkAction *action,
+                    TerminalWindow *window)
+{
+  GtkWidget *dialog = NULL;
+  TerminalWindowPrivate *priv = window->priv;
+  VteTerminal *terminal;
+
+  if (!priv->active_screen)
+        return;
+
+  terminal = VTE_TERMINAL (priv->active_screen);
+  g_return_if_fail (VTE_IS_TERMINAL (terminal));
+
+  dialog = gtk_file_chooser_dialog_new ( _("Save as..."),
+      NULL,
+      GTK_FILE_CHOOSER_ACTION_SAVE,
+      GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+      GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
+      NULL);
+
+  gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
+  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS));
+  g_signal_connect (dialog, "response", G_CALLBACK (terminal_util_save_term_text_cb), terminal);
+  g_signal_connect (dialog, "delete_event", G_CALLBACK (gtk_true), NULL);
+
+  gtk_widget_show_all (dialog);
+}
+
+
+static void
 file_close_tab_callback (GtkAction *action,
                          TerminalWindow *window)
 {
Index: src/gnome-terminal.schemas.in
===================================================================
--- src/gnome-terminal.schemas.in	(revision 3436)
+++ src/gnome-terminal.schemas.in	(working copy)
@@ -682,6 +682,23 @@
     </schema>
 
     <schema>
+      <key>/schemas/apps/gnome-terminal/keybindings/save_term_text</key>
+      <applyto>/apps/gnome-terminal/keybindings/save_term_text</applyto>
+      <owner>gnome-terminal</owner>
+      <type>string</type>
+      <default>disabled</default>
+      <locale name="C">
+          <short>Keyboard shortcut to save the current tab content to file</short>
+          <long>
+          Keyboard shortcut key to save the current tab to a file. Expressed as a string
+          in the same format used for GTK+ resource files.
+          If you set the option to the special string "disabled", then there 
+          will be no keyboard shortcut for this action.
+          </long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/apps/gnome-terminal/keybindings/close_tab</key>
       <applyto>/apps/gnome-terminal/keybindings/close_tab</applyto>
       <owner>gnome-terminal</owner>
Index: src/terminal.xml
===================================================================
--- src/terminal.xml	(revision 3436)
+++ src/terminal.xml	(working copy)
@@ -7,6 +7,7 @@
       <menu action="FileNewTabProfiles" />
       <separator />
       <menuitem action="FileNewProfile" />
+      <menuitem action="FileSaveTermText" />
       <separator />
       <menuitem action="FileCloseTab" />
       <menuitem action="FileCloseWindow" />
