orca r3559 - in trunk: . src/orca
- From: wwalker svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r3559 - in trunk: . src/orca
- Date: Mon, 11 Feb 2008 17:21:42 +0000 (GMT)
Author: wwalker
Date: Mon Feb 11 17:21:41 2008
New Revision: 3559
URL: http://svn.gnome.org/viewvc/orca?rev=3559&view=rev
Log:
Work on bug 434654 - Orca skips a line in flat review mode or with braille navigation (braille up / down).
Modified:
trunk/ChangeLog
trunk/src/orca/flat_review.py
Modified: trunk/src/orca/flat_review.py
==============================================================================
--- trunk/src/orca/flat_review.py (original)
+++ trunk/src/orca/flat_review.py Mon Feb 11 17:21:41 2008
@@ -702,7 +702,7 @@
zone = line.zones[zoneToCheck]
currentLineIndex = lineToCheck
currentZoneIndex = zoneToCheck
- if caretOffset:
+ if caretOffset and zone.words:
currentWordIndex = len(zone.words) - 1
currentCharIndex = \
zone.words[currentWordIndex].length - 1
@@ -942,6 +942,22 @@
textZones = self.splitTextIntoZones(
accessible, string, startOffset, cliprect)
+ # We need to account for the fact that newlines at the end of
+ # text are treated as being on the same line when they in fact
+ # are a whole separate blank line. So, we check for this and
+ # make up a new text zone for these cases. See bug 434654.
+ #
+ if (endOffset == length) and (string[-1:] == "\n"):
+ [x, y, width, height] = text.getRangeExtents(startOffset,
+ endOffset,
+ 0)
+ if not textZones:
+ textZones = []
+ textZones.append(TextZone(accessible,
+ endOffset,
+ "",
+ x, y + height, 0, height))
+
if textZones:
zones.extend(textZones)
elif len(zones):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]