[PR #4991] [MERGED] Properly represent block selections in UIA #26062

Open
opened 2026-01-31 09:13:41 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4991
Author: @carlos-zamora
Created: 3/18/2020
Status: Merged
Merged: 3/18/2020
Merged by: @undefined

Base: masterHead: dev/cazamor/acc/bounding-rect-refactor


📝 Commits (3)

  • f578f05 UIA: Use TextBuffer::GetTextRects for Bounding Rects
  • f31f978 Add IsBlockSelection() to IUiaData; Pipe through to UTR
  • da89932 code format + get text

📊 Changes

13 files changed (+44 additions, -47 deletions)

View changed files

📝 src/cascadia/TerminalCore/Terminal.hpp (+1 -0)
📝 src/cascadia/TerminalCore/TerminalSelection.cpp (+5 -0)
📝 src/host/renderData.cpp (+5 -0)
📝 src/host/renderData.hpp (+1 -0)
📝 src/interactivity/win32/screenInfoUiaProvider.cpp (+2 -2)
📝 src/interactivity/win32/uiaTextRange.cpp (+2 -1)
📝 src/interactivity/win32/uiaTextRange.hpp (+1 -0)
📝 src/types/IUiaData.h (+1 -0)
📝 src/types/TermControlUiaProvider.cpp (+2 -3)
📝 src/types/TermControlUiaTextRange.cpp (+2 -1)
📝 src/types/TermControlUiaTextRange.hpp (+1 -0)
📝 src/types/UiaTextRangeBase.cpp (+18 -39)
📝 src/types/UiaTextRangeBase.hpp (+3 -1)

📄 Description

Summary of the Pull Request

Block selections were always read and displayed as line selections in UIA. This fixes that.

PR Checklist

Detailed Description of the Pull Request / Additional comments

  1. Expose IsBlockSelection() via IUiaData
  2. Update the constructor to be able to take in a block selection parameter
  3. Make ScreenInfoUiaProviders pass step 1 output into step 2 constructor
  4. Update all instances of UiaTextRange::GetTextRects() to include this new flag

Validation Steps Performed

Manually tested.
Additional tests would be redundant as GetTextRects() is tested in the text buffer.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/4991 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 3/18/2020 **Status:** ✅ Merged **Merged:** 3/18/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/cazamor/acc/bounding-rect-refactor` --- ### 📝 Commits (3) - [`f578f05`](https://github.com/microsoft/terminal/commit/f578f05d29e377950a5e1fb0d8c586043088b00f) UIA: Use TextBuffer::GetTextRects for Bounding Rects - [`f31f978`](https://github.com/microsoft/terminal/commit/f31f978036306651e270d15aa07fbf2b2eee9090) Add IsBlockSelection() to IUiaData; Pipe through to UTR - [`da89932`](https://github.com/microsoft/terminal/commit/da89932f9ebff454fc795659aeb2dc0eaf3d0400) code format + get text ### 📊 Changes **13 files changed** (+44 additions, -47 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+1 -0) 📝 `src/cascadia/TerminalCore/TerminalSelection.cpp` (+5 -0) 📝 `src/host/renderData.cpp` (+5 -0) 📝 `src/host/renderData.hpp` (+1 -0) 📝 `src/interactivity/win32/screenInfoUiaProvider.cpp` (+2 -2) 📝 `src/interactivity/win32/uiaTextRange.cpp` (+2 -1) 📝 `src/interactivity/win32/uiaTextRange.hpp` (+1 -0) 📝 `src/types/IUiaData.h` (+1 -0) 📝 `src/types/TermControlUiaProvider.cpp` (+2 -3) 📝 `src/types/TermControlUiaTextRange.cpp` (+2 -1) 📝 `src/types/TermControlUiaTextRange.hpp` (+1 -0) 📝 `src/types/UiaTextRangeBase.cpp` (+18 -39) 📝 `src/types/UiaTextRangeBase.hpp` (+3 -1) </details> ### 📄 Description ## Summary of the Pull Request Block selections were always read and displayed as line selections in UIA. This fixes that. ## PR Checklist * [x] Closes #4509 ## Detailed Description of the Pull Request / Additional comments 1. Expose `IsBlockSelection()` via IUiaData 2. Update the constructor to be able to take in a block selection parameter 3. Make ScreenInfoUiaProviders pass step 1 output into step 2 constructor 4. Update all instances of `UiaTextRange::GetTextRects()` to include this new flag ## Validation Steps Performed Manually tested. Additional tests would be redundant as GetTextRects() is tested in the text buffer. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:13:41 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26062