[orca] Use TEXT_BOUNDARY_WORD_START instead of TEXT_BOUNDARY_WORD_END for the Gecko script's goNextWord()
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Use TEXT_BOUNDARY_WORD_START instead of TEXT_BOUNDARY_WORD_END for the Gecko script's goNextWord()
- Date: Sun, 12 May 2013 14:37:36 +0000 (UTC)
commit dd173e64326d647c366c8438e39b101586b3dd5c
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sun May 12 10:36:41 2013 -0400
Use TEXT_BOUNDARY_WORD_START instead of TEXT_BOUNDARY_WORD_END for the Gecko script's goNextWord()
src/orca/scripts/toolkits/Gecko/script.py | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 321d790..fbc03c6 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -4465,26 +4465,24 @@ class Script(default.Script):
# Make sure we have a word.
#
- characterOffset = max(0, characterOffset - 1)
+ characterOffset = max(0, characterOffset)
[obj, characterOffset] = \
self.findNextCaretInOrder(obj, characterOffset)
# To be consistent with Gecko's native navigation, we want to
# move to the next word end boundary.
#
- boundary = pyatspi.TEXT_BOUNDARY_WORD_END
+ boundary = pyatspi.TEXT_BOUNDARY_WORD_START
contents = self.getWordContentsAtOffset(obj, characterOffset, boundary)
if not (len(contents) and contents[-1][2]):
return
[obj, startOffset, endOffset, string] = contents[-1]
+ if string and string[-1].isspace():
+ endOffset -= 1
self.setCaretPosition(obj, endOffset)
self.updateBraille(obj)
- # Because we're getting the word based on the WORD_END boundary
- # rather than the WORD_START boundary, we need to increment our
- # offset.
- #
- self.speakMisspelledIndicator(obj, startOffset + 1)
+ self.speakMisspelledIndicator(obj, startOffset)
self.speakContents(contents)
def findPreviousLine(self, obj, characterOffset, updateCache=True):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]