Skip to content

Conversation

@pisv
Copy link
Contributor

@pisv pisv commented Sep 4, 2024

It looks like there is a significant bug lurking in the LineRange.join(other) method.

When other.startLineNumber < this.startLineNumber, the line count of the resulting line range should be

Math.max(this.endLineNumberExclusive, other.endLineNumberExclusive) - other.startLineNumber

rather than

Math.max(this.endLineNumberExclusive, other.endLineNumberExclusive) - this.startLineNumber
@hediet hediet enabled auto-merge (squash) September 10, 2024 14:20
@hediet
Copy link
Member

hediet commented Sep 10, 2024

Thanks!

This LineRange class has to go eventuall in favor of the core LineRange class (which uses [startLineNumber, endLineNumberExclusive) - using the length was a mistake, but I thought I could use it to avoid the exclusive/inclusive problem.)

@hediet hediet added this to the September 2024 milestone Sep 10, 2024
@hediet hediet modified the milestones: September 2024, October 2024 Sep 26, 2024
@hediet hediet modified the milestones: October 2024, November 2024 Oct 24, 2024
@hediet hediet modified the milestones: November 2024, January 2025 Dec 5, 2024
@hediet hediet modified the milestones: February 2025, March 2025 Feb 25, 2025
@hediet hediet modified the milestones: March 2025, April 2025 Mar 24, 2025
@hediet hediet merged commit 07e01e4 into microsoft:main Apr 11, 2025
1 check passed
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators May 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

4 participants