[orca] Ensure go{Next, Previous}Line() has a caret context before setting the position
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Ensure go{Next, Previous}Line() has a caret context before setting the position
- Date: Fri, 15 Nov 2013 02:15:46 +0000 (UTC)
commit ab2ccc5b681a47d5a8ff367bd2aeaebcdf78a374
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Nov 14 21:13:44 2013 -0500
Ensure go{Next,Previous}Line() has a caret context before setting the position
src/orca/scripts/toolkits/Gecko/script.py | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 360e5a0..eef3504 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -4259,14 +4259,15 @@ class Script(default.Script):
Returns True if we actually moved.
"""
+
[obj, characterOffset] = self.getCaretContext()
- [previousObj, previousCharOffset] = \
- self.findPreviousLine(obj, characterOffset)
- if not previousObj:
+ [prevObj, prevCharOffset] = self.findPreviousLine(obj, characterOffset)
+ if not prevObj:
return False
- self.setCaretPosition(previousObj, previousCharOffset)
- self.presentLine(previousObj, previousCharOffset)
+ [obj, caretOffset] = self.findFirstCaretContext(prevObj, prevCharOffset)
+ self.setCaretPosition(obj, caretOffset)
+ self.presentLine(prevObj, prevCharOffset)
return True
@@ -4279,11 +4280,11 @@ class Script(default.Script):
[obj, characterOffset] = self.getCaretContext()
[nextObj, nextCharOffset] = self.findNextLine(obj, characterOffset)
-
if not nextObj:
return False
- self.setCaretPosition(nextObj, nextCharOffset)
+ [obj, caretOffset] = self.findFirstCaretContext(nextObj, nextCharOffset)
+ self.setCaretPosition(obj, caretOffset)
self.presentLine(nextObj, nextCharOffset)
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]