[PR #15860] Improve CommandNumberPopup::_handleNumber() #30759

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

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

State: closed
Merged: No


Summary of the Pull Request

This PR improves the readability and robustness of the CommandNumberPopup::_handleNumber() function.

Changes:

  • A comment was added to explain what the function does.
  • The cookedReadData object was made immutable.
  • A using directive was used to import the std::size_t type.
  • A RAII object was used to manage the WriteCharsLegacy() call.
  • A catch(...) block was used to catch any exceptions that are thrown by the WriteCharsLegacy() call.

PR Checklist

  • [ x] Closes #xxx
  • [x ] Tests added/passed
  • [x ] Documentation updated
    • If checked, please file a pull request on our docs repo and link it here: #xxx
  • [ x] Schema updated (if necessary)
**Original Pull Request:** https://github.com/microsoft/terminal/pull/15860 **State:** closed **Merged:** No --- ## Summary of the Pull Request This PR improves the readability and robustness of the `CommandNumberPopup::_handleNumber()` function. Changes: * A comment was added to explain what the function does. * The `cookedReadData` object was made immutable. * A `using` directive was used to import the `std::size_t` type. * A `RAII` object was used to manage the `WriteCharsLegacy()` call. * A `catch(...)` block was used to catch any exceptions that are thrown by the `WriteCharsLegacy()` call. ## PR Checklist - [ x] Closes #xxx - [x ] Tests added/passed - [x ] Documentation updated - If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx - [ x] Schema updated (if necessary)
claunia added the pull-request label 2026-01-31 09:42:47 +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#30759