Repository navigation
Ui Automation in Windows Console: fix _getTextLines for 21H1 - #11760
Merged
Merged
Conversation
See test results for failed build of commit 7370b21590 |
codeofdusk
force-pushed
the
cmduia-fix-21h1-wrap
branch
from
October 15, 2020 09:02
aa1238e to
84d9e99
Compare
This comment has been minimized.
This comment has been minimized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Supersedes #11722. Fixes #11740 (originally filed upstream as microsoft/terminal#5481). Blocking #10964.
Summary of the issue:
In an old implementation of NVDA's UIA console support, we originally used the standard
_getTextLinesimplementation, which calledgetTextInChunksto get each line from the console according to UIA. This was extremely slow to run over the entire buffer, so we switched to getting all text and callingsplitlines, which was much faster.In pre-21H1 UIA console, every line ended with a newline character. In 21H1 console, new text can wrap across lines, so every line doesn't necessarily end in a newline. This makes
splitlinesinadequate for 21H1: when text wraps, NVDA starts reading from the beginning of the visible text for every new line of output!Description of how this pull request fixes the issue:
This PR:
_getTextLinesoverride on the 21H1 UIA console. Pre-21H1 is entirely unaffected.POSITION_LASTbased on a conversation with @carlos-zamora.Testing performed:
Re-tested the case in microsoft/terminal#5481 and verified that it is no longer reproducible.
Known issues with pull request:
Change log entry:
None needed.