[orca] Eliminate a couple of cases where caret nav gets stuck in browse mode
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Eliminate a couple of cases where caret nav gets stuck in browse mode
- Date: Mon, 1 Sep 2014 23:30:20 +0000 (UTC)
commit 2ed9487471d98584603ef362923d7c587df0f394
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Sep 1 19:28:52 2014 -0400
Eliminate a couple of cases where caret nav gets stuck in browse mode
.../scripts/toolkits/Gecko/script_utilities.py | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script_utilities.py
b/src/orca/scripts/toolkits/Gecko/script_utilities.py
index 044dc06..0c9e237 100644
--- a/src/orca/scripts/toolkits/Gecko/script_utilities.py
+++ b/src/orca/scripts/toolkits/Gecko/script_utilities.py
@@ -822,24 +822,21 @@ class Utilities(script_utilities.Utilities):
break
objects[0:0] = onLeft
- prevObj, pOffset = self._script.findPreviousCaretInOrder(onLeft[0][0], onLeft[0][1])
- if prevObj == onLeft[0][0]:
- prevObj, pOffset = self._script.findPreviousCaretInOrder(prevObj, pOffset)
+ firstObj, firstStart = objects[0][0], objects[0][1]
+ prevObj, pOffset = self._script.findPreviousCaretInOrder(firstObj, firstStart)
# Check for things on the same line to the right of this object.
- lastObj, lastStart, lastEnd, lastString = objects[-1]
- while lastObj and lastString and not lastString.endswith("\n"):
- nextObj, nOffset = self._script.findNextCaretInOrder(lastObj, lastEnd - 1)
- if not nextObj:
- break
-
+ lastObj, lastEnd = objects[-1][0], objects[-1][2]
+ nextObj, nOffset = self._script.findNextCaretInOrder(lastObj, lastEnd - 1)
+ while nextObj:
onRight = self._getLineContentsForObj(nextObj, nOffset)
onRight = list(filter(_include, onRight))
if not onRight:
break
objects.extend(onRight)
- lastObj, lastStart, lastEnd, lastString = objects[-1]
+ lastObj, lastEnd = objects[-1][0], objects[-1][2]
+ nextObj, nOffset = self._script.findNextCaretInOrder(lastObj, lastEnd - 1)
return objects
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]