-
-
Notifications
You must be signed in to change notification settings - Fork 637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI Automation in Windows Console: Downgrade E_FAIL when comparing selection changes to debugWarning #11039
UI Automation in Windows Console: Downgrade E_FAIL when comparing selection changes to debugWarning #11039
Conversation
It looks like microsoft/terminal#5399 is merged. Is this pr still valid? |
Yes, it depends on changes from that PR. |
What is NVDA trying to do when this exception is raised? There is very little context here about what effect this error has on NVDA. Can you answer why NVDA is attempting to compare two endpoints in different buffers/coordinate systems? |
This comment has been minimized.
This comment has been minimized.
I discussed this offline with @carlos-zamora. microsoft/terminal#5406 won't make it into 21H1, but we think this is a reasonable approach. |
I've updated the description of this PR to improve clarity. Cc @feerrenrut, @michaelDCurran. Also note that this PR is blocking #10964. |
I couldn't reproduce the initial problem from the testing steps listed. Without that I can't verify this fixes the issue. With
I tried with a fresh config also (and enabled "use UI Automation to access the Windows Console when available") Then:
Looking at microsoft/terminal#5309 it seems that this may only reproducible on Win10-21H1? Can you let me know if this is the case. This kind of information is quite important for us to know how to prioritize a PR. |
This doesn't happen on Windows Terminal, as terminal doesn't have an alt buffer (is that correct, @carlos-zamora and @DHowett)? It only applies to UIA in inbox and OpenConsole. |
That's true today, but only due to time and prioritization :) |
Right, so this PR is helpful on conhost now and Windows Terminal eventually. |
Yeah, our discussion on microsoft/terminal#5309 had this issue not repro in Windows Terminal for some reason. But your reasoning is correct. In a situation like this, we're comparing two text ranges that belong to two entirely different coordinate spaces. |
@feerrenrut are you able to see the error generated (before this PR at level error, after it at level debug warning) using the build in #10618 (comment) (run OpenConsole.exe)? |
Please update the description with accurate testing steps. |
Done. |
Sorry @codeofdusk these steps still leave a large amount of assumed knowledge. Please give step by step instructions. I'd prefer not to waste time testing the wrong thing again. Please answer at least the following:
|
You are correct re inbox. OpenConsole is the open-source version of Windows Console (AKA conhost) available on Github (available in the same repo as the new Windows Terminal, which is a different application altogether).
Yes, if you use OpenConsole this can be tested (I think) as far back as Windows 10 1607. I've run OpenConsole on builds as early as 1903 with no problem.
Either a 21H1 build (in which case, you can run the inbox console) or OpenConsole on Windows 10 1903 or later.
|
Right. So this fix doesn't really apply unless you are running insider builds of Windows, or have built OpenConsole manually. Given the low risk for this change and the difficulty of testing it, I'm going ahead with it as it is. |
…ess#11039)" This reverts commit e274931.
…ess#11039)" This reverts commit e274931.
…ess#11039)" This reverts commit e274931.
…ess#11039)" This reverts commit e274931.
Link to issue number:
microsoft/terminal#5399.
Blocking #10964.
Summary of the issue:
Conhost has two buffers: a normal, used for most commands; and an alternate, used, for example, for screen-based editors on Linux machines. Calling
compareEndPoints
on text infos returnsE_FAIL
, since these ranges aren't comparable (they're in different buffers). Therefore, when attempting to detect selection changes when switching from normal to alternate buffer (or vice versa), an error is logged.To see the error, run the latest inbox conhost or OpenConsole. You can try using the build listed in #10618 (comment) (run OpenConsole.exe), and run nano (either in wsl or over ssh).
Description of how this pull request fixes the issue:
Downgrades the expected exception in
detectPossibleSelectionChange
fromerror
todebugWarning
.Testing performed:
ssh
.nano
. Observed that no error sound was played, the exception was logged atdebugWarning
, and the console functioned normally.Known issues with pull request:
Change log entry:
None.