PSReadLine
PSReadLine copied to clipboard
Fix handling of surrogate pairs in length calculation
PR Summary
Adds new conditions to handle surrogate pairs when calculating the buffer length of a string.
Fixes https://github.com/PowerShell/PSReadLine/issues/3857.
PR Checklist
- [X] PR has a meaningful title
- Use the present tense and imperative mood when describing your changes
- [X] Summarized changes
- [ ] Make sure you've added one or more new tests
- [X] Make sure you've tested these changes in terminals that PowerShell is commonly used in (i.e. conhost.exe, Windows Terminal, Visual Studio Code Integrated Terminal, etc.)
- User-facing changes
- [X] Not Applicable
Microsoft Reviewers: Open in CodeFlow
@microsoft-github-policy-service agree
I think this pull request needs a unit-test to demonstrate the requirements.