Skip to content

Conversation

@davidgilbertson
Copy link

Currently apply_patch will fail on Windows if the file contents happen to have a multi-byte character at the point where the preview function truncates.

I've used the existing take_bytes_at_char_boundary helper and added a regression test (that fails without the fix).

This is related to #4013 but doesn't fix it.

Avoid panicking when the command preview truncates multi-byte characters.
Use a char-boundary truncation helper and add a regression test.
@github-actions
Copy link
Contributor

github-actions bot commented Jan 1, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@davidgilbertson
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant