ScreenInfoUiaProvider::GetVisibleRanges() returns an improper result #6340

Open
opened 2026-01-31 00:36:11 +00:00 by claunia · 0 comments
Owner

Originally created by @carlos-zamora on GitHub (Feb 7, 2020).

Originally assigned to: @carlos-zamora on GitHub.

Summary

Our TermControlUiaProvider (aka ScreenInfoUiaProvider) returns a list of UiaTextRange for our visible ranges (one per row in the buffer).

The docs for GetVisibleRanges state we should only return one range.

Technical Details

We only have one continuous span of text visible at a time (within a given Terminal Control).

The documentation for GetVisibleRanges states as follows:

If the visible text consists of one contiguous span of text, the pRetVal array should contain a single text range that represents all of the visible text.

ITextProvider::GetVisibleRanges should return a degenerate (empty) text range if no text is visible, if all text is scrolled out of view, or if the text-based control contains no text.

Originally created by @carlos-zamora on GitHub (Feb 7, 2020). Originally assigned to: @carlos-zamora on GitHub. # Summary Our TermControlUiaProvider (aka ScreenInfoUiaProvider) returns a list of `UiaTextRange` for our visible ranges (one per row in the buffer). The docs for `GetVisibleRanges` state we should only return one range. # Technical Details We only have one continuous span of text visible at a time (within a given Terminal Control). The documentation for [GetVisibleRanges](https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextprovider-getvisibleranges) states as follows: >If the visible text consists of one contiguous span of text, the pRetVal array should contain a single text range that represents all of the visible text. > > >ITextProvider::GetVisibleRanges should return a degenerate (empty) text range if no text is visible, if all text is scrolled out of view, or if the text-based control contains no text.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6340