Skip to content

Conversation

@ToddGrun
Copy link
Contributor

@ToddGrun ToddGrun commented Oct 27, 2025

I hit an exception in the SourceText system when inserting a copilot edit for C# content in a razor file when the file uses newlines only. This ended up causing a CR/LF split in the subtext class, which had some bogus logic for when that happened.

Added a very simple unit test that demonstrated previous failure.

…an start

I hit an exception in the SourceText system when inserting a copilot edit for C# content in a razor file when the file uses newlines only. This ended up causing a CR/NL split in the subtext class, which had some bogus logic for when that happened.

Added a very simple unit test that demonstrated previous failure.
@ToddGrun ToddGrun requested a review from a team as a code owner October 27, 2025 01:34
@ToddGrun ToddGrun changed the title Fix issue with when a CR/NL split occurs at a SubText's underlying span start Fix issue with when a CR/LF split occurs at a SubText's underlying span start Oct 27, 2025
@ToddGrun
Copy link
Contributor Author

@dotnet/roslyn-compiler -- ptal

2) Fix bug that found where a TextLine was being created with a start position that was beyond the subtext's length.
@ToddGrun
Copy link
Contributor Author

@dotnet/roslyn-compiler -- ptal. Thanks!

@ToddGrun ToddGrun merged commit 62c2cf9 into dotnet:main Oct 29, 2025
24 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants