[PR #13313] [1.14] Remove most uses of CompareInBounds #29472

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

Original Pull Request: https://github.com/microsoft/terminal/pull/13313

State: closed
Merged: No


Summary of the Pull Request

⚠️Targets 1.14⚠️

Replaces most uses of Viewport::CompareInBounds() with til::point's < and > operators. CompareInBounds has been the cause of a bunch of UIA crashes over the years. Replacing them entirely ensures that the FAILFAST_IF isn't ever touched.

This was a bit tricky to do because I wanted to ensure the same functionality was maintained. Since we still have a ton of COORDs floating around, I just cast to til::point when we're about to do a comparison. We could do smarter changes, but I'm concerned that could cause a bug we could miss.

References

#13183
#13244 - same PR but for main

**Original Pull Request:** https://github.com/microsoft/terminal/pull/13313 **State:** closed **Merged:** No --- ## Summary of the Pull Request ⚠️Targets 1.14⚠️ Replaces most uses of `Viewport::CompareInBounds()` with `til::point`'s `<` and `>` operators. `CompareInBounds` has been the cause of a bunch of UIA crashes over the years. Replacing them entirely ensures that the `FAILFAST_IF` isn't ever touched. This was a bit tricky to do because I wanted to ensure the same functionality was maintained. Since we still have a ton of `COORD`s floating around, I just cast to `til::point` when we're about to do a comparison. We _could_ do smarter changes, but I'm concerned that could cause a bug we could miss. ## References #13183 #13244 - same PR but for `main`
claunia added the pull-request label 2026-01-31 09:35:07 +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#29472