[orca/gnome-3-28] braille: fix bogus dots appearing after text
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-28] braille: fix bogus dots appearing after text
- Date: Sat, 21 Apr 2018 12:41:02 +0000 (UTC)
commit 58829f720c780099959fcf0cefbdee8c9b49b9b4
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Thu Apr 5 23:25:07 2018 +0200
braille: fix bogus dots appearing after text
endPos-startPos may not be as big as the braille output (which is the reason
for the whilewriteStruct.regionSize < _displaySize[0] loop actually).
attributeMask was getting grown by the loop, but then still cut to
endPos-startPos, thus leaving undefined values in the rest of the
braille output.
This changes the logic to the same as for computing substring: cut the
piece first, add spaces, and just put the result in the writeStruct.
https://bugzilla.gnome.org/show_bug.cgi?id=795015
src/orca/braille.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/braille.py b/src/orca/braille.py
index df80286..7920f7b 100644
--- a/src/orca/braille.py
+++ b/src/orca/braille.py
@@ -1189,6 +1189,10 @@ def refresh(panToCursor=True,
log.info(logLine)
substring = string[startPos:endPos]
+ if attributeMask:
+ submask = attributeMask[startPos:endPos]
+ else:
+ submask = '\x00' * (endPos - startPos)
if not _brlAPIRunning:
init(_callback, settings.tty)
if _brlAPIRunning:
@@ -1198,7 +1202,7 @@ def refresh(panToCursor=True,
while writeStruct.regionSize < _displaySize[0]:
substring += " "
if attributeMask:
- attributeMask += '\x00'
+ submask += '\x00'
writeStruct.regionSize += 1
writeStruct.text = substring
writeStruct.cursor = cursorCell
@@ -1219,7 +1223,7 @@ def refresh(panToCursor=True,
#writeStruct.attrOr = myUnderline
if attributeMask:
- writeStruct.attrOr = attributeMask[startPos:endPos]
+ writeStruct.attrOr = submask
if not _brlAPIRunning:
init(_callback, settings.tty)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]