Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error when piping IFilePosition to ConvertTo-ScriptExtent #1814

Merged

Conversation

SeeminglyScience
Copy link
Collaborator

No description provided.

@SeeminglyScience SeeminglyScience requested a review from a team as a code owner May 24, 2022 19:10
While resisting the urge to burn the entire file to the ground. Boy did
I have some wild style choices five years ago.
When passing a single Line/Column value, we now assume you want a zero
length extent of a single point. This was already the case for buffer
ranges.

Also take a pass at style because it was an abomination and I apologize
to the world for doing it.
Offset calculation was hitting the same new line repeatedly as it didn't
set the new offset for one *after* the new line char.

Also empty extents pass null as `FileContext` so added some null checks.
@SeeminglyScience SeeminglyScience requested a review from a team as a code owner May 25, 2022 15:55
@andyleejordan andyleejordan added Issue-Bug A bug to squash. Area-API labels Jun 2, 2022
@andyleejordan andyleejordan merged commit bff3b49 into PowerShell:master Jun 2, 2022
@SeeminglyScience SeeminglyScience deleted the fix-convertto-scriptextent branch June 7, 2022 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-API Issue-Bug A bug to squash.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants