[orca] Fix bug in our workaround for broken Gecko text
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix bug in our workaround for broken Gecko text
- Date: Tue, 16 Apr 2019 22:09:58 +0000 (UTC)
commit d087ed06703a7744a7606c39dca3b8cee2bbd338
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Apr 16 18:05:44 2019 -0400
Fix bug in our workaround for broken Gecko text
Gecko's text support gives us inconsistent results for strings that
include a hyphen. If we split on hyphens in our workaround, we won't
be able to find the current word when on a hyphen.
src/orca/scripts/web/script_utilities.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 0912099b3..5affaca3e 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -1021,7 +1021,7 @@ class Utilities(script_utilities.Utilities):
if string and boundary in [pyatspi.TEXT_BOUNDARY_SENTENCE_START, None]:
return string, rangeStart, rangeEnd
- words = [m.span() for m in re.finditer("[^\\s\\-\ufffc]+", string)]
+ words = [m.span() for m in re.finditer("[^\\s\ufffc]+", string)]
words = list(map(lambda x: (x[0] + rangeStart, x[1] + rangeStart), words))
if boundary == pyatspi.TEXT_BOUNDARY_WORD_START:
spans = list(filter(_inThisSpan, words))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]