Skip to content

Commit

Permalink
Ignore _expandCollapseBeforeReview in script_reviewStartOfLine. (PR #…
Browse files Browse the repository at this point in the history
…9944)

This fixes an issue in UIA consoles, invoking the "review start of line" script (`shift+numpad 1` by default) does not move the review cursor.

Expanding and collapsing the textInfo is essential for the functionality of this script (to move the textInfo to the start of the line), we should ignore the _expandCollapseBeforeReview flag.

The _expandCollapseBeforeReview flag was added in #9614. It is True everywhere except in UIA consoles.
  • Loading branch information
codeofdusk authored and feerrenrut committed Jul 31, 2019
1 parent 288af0d commit 4e63498
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/globalCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,9 +1096,8 @@ def script_review_nextWord(self,gesture):

def script_review_startOfLine(self,gesture):
info=api.getReviewPosition().copy()
if info._expandCollapseBeforeReview:
info.expand(textInfos.UNIT_LINE)
info.collapse()
info.expand(textInfos.UNIT_LINE)
info.collapse()
api.setReviewPosition(info)
info.expand(textInfos.UNIT_CHARACTER)
ui.reviewMessage(_("Left"))
Expand Down

0 comments on commit 4e63498

Please sign in to comment.