orca r3476 - in trunk: . src/orca



Author: joanied
Date: Fri Jan 18 20:56:22 2008
New Revision: 3476
URL: http://svn.gnome.org/viewvc/orca?rev=3476&view=rev

Log:
* src/orca/Gecko.py: 
  Fix for bug #509482 - Line navigation in FF wraps from top
  of file to bottom.


Modified:
   trunk/ChangeLog
   trunk/src/orca/Gecko.py

Modified: trunk/src/orca/Gecko.py
==============================================================================
--- trunk/src/orca/Gecko.py	(original)
+++ trunk/src/orca/Gecko.py	Fri Jan 18 20:56:22 2008
@@ -8021,11 +8021,7 @@
             [obj, characterOffset] = self.getCaretContext()
 
         if not obj:
-            obj = self.getLastObject()
-            [obj, characterOffset] = self.findPreviousCaretInOrder(obj, 0)
-
-        if not obj:
-            return [None, -1]
+            return self.getTopOfFile()
 
         currentLine = self._currentLineContents
         index = self.findObjectOnLine(obj, characterOffset, currentLine)
@@ -8248,11 +8244,7 @@
             [obj, characterOffset] = self.getCaretContext()
 
         if not obj:
-            obj = self.getDocumentFrame()
-            [obj, characterOffset] = self.findFirstCaretContext(obj, -1)
-
-        if not obj:
-            return [None, -1]
+            return self.getBottomOfFile()
 
         currentLine = self._currentLineContents
         index = self.findObjectOnLine(obj, characterOffset, currentLine)
@@ -8414,6 +8406,9 @@
         [obj, characterOffset] = self.getCaretContext()
         [previousObj, previousCharOffset] = \
                                    self.findPreviousLine(obj, characterOffset)
+        if not previousObj:
+            return
+
         self.setCaretPosition(previousObj, previousCharOffset)
         self.presentLine(previousObj, previousCharOffset)
 
@@ -8427,8 +8422,13 @@
         """Positions the caret offset at the next line in the document
         window, attempting to preserve horizontal caret position.
         """
+
         [obj, characterOffset] = self.getCaretContext()
         [nextObj, nextCharOffset] = self.findNextLine(obj, characterOffset)
+
+        if not nextObj:
+            return
+
         self.setCaretPosition(nextObj, nextCharOffset)
         self.presentLine(nextObj, nextCharOffset)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]