[orca] Treat terminal insertions which end at the caret as presentable
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Treat terminal insertions which end at the caret as presentable
- Date: Mon, 9 Jul 2018 15:13:57 +0000 (UTC)
commit 4fc814e52db362dae3c4b1bf3f6bdc742d549a9e
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Jul 9 11:13:05 2018 -0400
Treat terminal insertions which end at the caret as presentable
src/orca/scripts/terminal/script_utilities.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/src/orca/scripts/terminal/script_utilities.py b/src/orca/scripts/terminal/script_utilities.py
index 986cdc965..6258a41db 100644
--- a/src/orca/scripts/terminal/script_utilities.py
+++ b/src/orca/scripts/terminal/script_utilities.py
@@ -113,6 +113,16 @@ class Utilities(script_utilities.Utilities):
return adjusted
+ def insertionEndsAtCaret(self, event):
+ try:
+ text = event.source.queryText()
+ except:
+ msg = "ERROR: Exception querying text for %s" % event.source
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return False
+
+ return text.caretOffset == event.detail1 + event.detail2
+
def isEditableTextArea(self, obj):
if obj and obj.getRole() == pyatspi.ROLE_TERMINAL:
return True
@@ -184,6 +194,8 @@ class Utilities(script_utilities.Utilities):
return True
if len(event.any_data) > 1 and self.lastInputEventWasPrintableKey():
return True
+ if self.insertionEndsAtCaret(event):
+ return True
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]