[orca] Don't use text offset of 1 for empty text



commit 75c433b3dd46b1b590e2758351f743d50e3d942a
Author: Michael Weghorn <m weghorn posteo de>
Date:   Thu Aug 11 14:34:45 2022 +0000

    Don't use text offset of 1 for empty text

 src/orca/scripts/default.py | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index b0d8409f0..b4650f24b 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -3828,6 +3828,9 @@ class Script(script.Script):
             debug.println(debug.LEVEL_INFO, msg, True)
             return ["", 0, 0]
 
+        if characterCount == 0:
+            return ["", 0, 0]
+
         targetOffset = startOffset
         if targetOffset is None:
             targetOffset = max(0, offset)


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