Repository navigation
Fix Virtual Review in modern command-line windows (Windows Terminal) - #16
Closed
serrebidev wants to merge 1 commit into
Closed
serrebidev wants to merge 1 commit into
serrebidev wants to merge 1 commit into
Conversation
On Windows 11, cmd/PowerShell/WSL run inside Windows Terminal, where the text lives in a UIA "TermControl" rather than the legacy console buffer. The previous code only reached it by walking down from the foreground window's children, which misses the active tab/pane and aborts entirely if any UIAElement.currentClassName access raises a COM error. Detect the terminal directly from the focused control (walking up its ancestors) and capture straight from there, so control+NVDA+w works across every tab and split pane regardless of the host window's class name. Detection is now exception-safe, so a single failing object can no longer stop the review command. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Author
|
This PR is the core fix — it restores control+NVDA+w in modern command-line windows.
Notes for review:
|
This was referenced Jul 12, 2026
|
Ported to ragb#5, where maintenance now continues. Credited via Co-Authored-By. Thanks @serrebidev. |
Author
|
Ported with credit and merged in the maintained repository as ragb#5. Closing this obsolete PR in the old repository. |
1 of 3 tasks
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.
Problem
control+NVDA+w(Virtual Review) stopped working in many command-line windows. On Windows 11,cmd/PowerShell/WSL run inside Windows Terminal, where the text is exposed through a UIATermControlelement rather than the legacy console buffer.The current code only reaches that control by walking down from the foreground window's children in
obtainUWPWindowText(). That approach:UIAElement.currentClassNameaccess raises a COM error while iterating.Fix
_isTermControl()helper and reuse it for the existing inline checks (so a single failing object can no longer stop the command)._findTermControl(), which finds theTermControlby walking up from the focused object.Legacy
ConsoleWindowClassconsoles and the generic display-model path are unchanged.Testing
Verified with
control+NVDA+win Windows Terminal running cmd, PowerShell and WSL, including multiple tabs and split panes, plus a legacyconhostconsole. NVDA 2026.1 on Windows 11.🤖 Generated with Claude Code