[orca] Fix for bug 515817 - Flat review lands on blank line at end of text area when navigating by previous



commit eed10aaa0c149c9a8cc53912cbe42833d612bac2
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Jan 2 08:03:24 2013 -0500

    Fix for bug 515817 - Flat review lands on blank line at end of text area when navigating by previous word

 src/orca/flat_review.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/flat_review.py b/src/orca/flat_review.py
index 65c87e4..9a9efaa 100644
--- a/src/orca/flat_review.py
+++ b/src/orca/flat_review.py
@@ -1800,6 +1800,12 @@ class Context:
                     or (len(zone.words) \
                         and zone.words[self.wordIndex].string.isspace())):
 
+                hasMoreText = False
+                if self.lineIndex > 0 and isinstance(zone, TextZone):
+                    prevZone = self.lines[self.lineIndex - 1].zones[-1]
+                    if prevZone.accessible == zone.accessible:
+                        hasMoreText = True
+
                 # If we're on whitespace in the same zone, then let's
                 # try to move on.  If not, we've definitely moved
                 # across accessibles.  If that's the case, let's try
@@ -1808,7 +1814,7 @@ class Context:
                 # with no words and we should do our best to announce
                 # this to the user (e.g., "whitespace" or "blank").
                 #
-                if zone.accessible == accessible:
+                if zone.accessible == accessible or hasMoreText:
                     moved = self.goPrevious(Context.WORD, wrap)
                 else:
                     wordIndex = self.wordIndex - 1



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