[orca/gnome-3-14] Move past space and non-breaking space chars when putting together line contents
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-14] Move past space and non-breaking space chars when putting together line contents
- Date: Mon, 15 Sep 2014 11:11:43 +0000 (UTC)
commit f2cda27756d9735521ec7aa50d4dd60d1dbca676
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Sep 15 07:10:22 2014 -0400
Move past space and non-breaking space chars when putting together line contents
.../scripts/toolkits/Gecko/script_utilities.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script_utilities.py
b/src/orca/scripts/toolkits/Gecko/script_utilities.py
index a593a42..273c4f1 100644
--- a/src/orca/scripts/toolkits/Gecko/script_utilities.py
+++ b/src/orca/scripts/toolkits/Gecko/script_utilities.py
@@ -761,6 +761,8 @@ class Utilities(script_utilities.Utilities):
objects[0:0] = onLeft
firstObj, firstStart = objects[0][0], objects[0][1]
prevObj, pOffset = self._script.findPreviousCaretInOrder(firstObj, firstStart)
+ if self._script.getCharacterAtOffset(prevObj, pOffset) in [" ", "\xa0"]:
+ prevObj, pOffset = self._script.findPreviousCaretInOrder(prevObj, pOffset)
# Check for things on the same line to the right of this object.
lastObj, lastEnd = objects[-1][0], objects[-1][2]
@@ -774,7 +776,7 @@ class Utilities(script_utilities.Utilities):
objects.extend(onRight)
lastObj, lastEnd = objects[-1][0], objects[-1][2]
nextObj, nOffset = self._script.findNextCaretInOrder(lastObj, lastEnd - 1)
- if self._script.getCharacterAtOffset(nextObj, nOffset) == " ":
+ if self._script.getCharacterAtOffset(nextObj, nOffset) in [" ", "\xa0"]:
nextObj, nOffset = self._script.findNextCaretInOrder(nextObj, nOffset)
return objects
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]