[PR #13025] Use 32-bit coordinates throughout the project #29343

Closed
opened 2026-01-31 09:34:21 +00:00 by claunia · 0 comments
Owner

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

State: closed
Merged: Yes


Previously this project used a great variety of types to present text buffer
coordinates: short, unsigned short, int, unsigned int, size_t,
ptrdiff_t, COORD/SMALL_RECT (aka short), and more.
This massive commit migrates almost all use of those types over to the
centralized types til::point/size/rect/inclusive_rect and their
underlying type til::CoordType (aka int32_t).

Due to the size of the changeset and statistics I expect it to contain bugs.
The biggest risk I see is that some code potentially, maybe implicitly, expected
arithmetic to be mod 2^16 and that this code now allows it to be mod 2^32.
Any narrowing into short later on would then throw exceptions.

PR Checklist

Validation Steps Performed

Casual usage of OpenConsole and Windows Terminal.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/13025 **State:** closed **Merged:** Yes --- Previously this project used a great variety of types to present text buffer coordinates: `short`, `unsigned short`, `int`, `unsigned int`, `size_t`, `ptrdiff_t`, `COORD`/`SMALL_RECT` (aka `short`), and more. This massive commit migrates almost all use of those types over to the centralized types `til::point`/`size`/`rect`/`inclusive_rect` and their underlying type `til::CoordType` (aka `int32_t`). Due to the size of the changeset and statistics I expect it to contain bugs. The biggest risk I see is that some code potentially, maybe implicitly, expected arithmetic to be mod 2^16 and that this code now allows it to be mod 2^32. Any narrowing into `short` later on would then throw exceptions. ## PR Checklist * [x] Closes #4015 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed Casual usage of OpenConsole and Windows Terminal. ✅
claunia added the pull-request label 2026-01-31 09:34:21 +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#29343