Index: gnome-terminal.py
===================================================================
--- gnome-terminal.py	(revision 1937)
+++ gnome-terminal.py	(working copy)
@@ -37,6 +37,8 @@
 import orca.settings as settings
 import orca.speech as speech
 
+from orca.orca_i18n import _           # for gettext support
+
 ########################################################################
 #                                                                      #
 # The GnomeTerminal script class.                                      #
@@ -59,6 +61,38 @@
         #
         self.presentIfInactive = False
 
+    def sayLine(self, obj):
+        """Speaks the line of an AccessibleText object that contains the
+        caret, unless the line is empty in which case it's ignored.
+
+        Arguments:
+        - obj: an Accessible object that implements the AccessibleText
+               interface
+        """
+
+        default.Script.sayLine(self, obj)
+
+        # gnome-terminal gives up a line of spaces instead of just a
+        # newline when we have a blank line in the terminal window when 
+        # using an application such as vi (see bug #397668).
+        #
+        # To work around this, we check to see if the last keyboard
+        # character typed by the user was up or down arrow. If it was
+        # and we have a line of space and the start offset and caret
+        # offset are the same and the user wants blank line spoken, 
+        # then speak "blank".
+        #
+        string = orca_state.lastInputEvent.event_string
+        if (string == "Up") or (string == "Down"):
+            [line, caretOffset, startOffset] = util.getTextLineAtCaret(obj)
+            allSpaces = True
+            for i in range(0, len(line)):
+                if line[i] != " ":
+                    allSpaces = False
+            if allSpaces == True and startOffset == caretOffset \
+               and settings.speakBlankLines:
+                speech.speak(_("blank"))
+
     #def onWindowActivated(self, event):
     #    # Sets the context to the top level window first, so we can
     #    # get information about it the window we just moved to.
