[orca] Have next line presentation treat the last object on the line as priorObj



commit ef90d34376e4e689675eccece41d9b08b2ae2d1b
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Feb 12 18:53:25 2020 +0100

    Have next line presentation treat the last object on the line as priorObj
    
    This prevents us from re-announcing context inappropriately.

 src/orca/caret_navigation.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/caret_navigation.py b/src/orca/caret_navigation.py
index 4c7ef1303..ad6b829f6 100644
--- a/src/orca/caret_navigation.py
+++ b/src/orca/caret_navigation.py
@@ -322,13 +322,18 @@ class CaretNavigation:
                 debug.println(debug.LEVEL_INFO, msg)
                 return True
 
+        obj, offset = script.utilities.getCaretContext()
+        line = script.utilities.getLineContentsAtOffset(obj, offset)
+        if not (line and line[0]):
+            return False
+
         contents = script.utilities.getNextLineContents()
         if not contents:
             return False
 
         obj, start = contents[0][0], contents[0][1]
         script.utilities.setCaretPosition(obj, start)
-        script.speakContents(contents)
+        script.speakContents(contents, priorObj=line[-1][0])
         script.displayContents(contents)
         return True
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]