Skip to content

Conversation

gabritto
Copy link
Member

No description provided.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in the ComparePositions function that was incorrectly comparing the line property twice instead of comparing character positions when lines are equal. Additionally, it updates numerous test baselines to reflect corrected LSP position comparisons in "find all references" and "go to definition" functionality.

  • Fixed logical error in LSP position comparison function
  • Updated baseline test files to reflect corrected position handling
  • Improved accuracy of reference and definition location reporting

Reviewed Changes

Copilot reviewed 54 out of 54 changed files in this pull request and generated 1 comment.

File Description
internal/ls/utilities.go Fixed bug in ComparePositions function - now correctly compares Character field instead of comparing Line field twice
testdata/baselines/reference/fourslash/*.baseline.jsonc Updated test baselines to reflect corrected position comparisons for find all references and go to definition functionality

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops

@gabritto
Copy link
Member Author

Forgot to run updateFailing 😬

@gabritto gabritto requested a review from jakebailey September 10, 2025 15:54
@gabritto gabritto added this pull request to the merge queue Sep 10, 2025
Merged via the queue into main with commit f500954 Sep 10, 2025
22 checks passed
@gabritto gabritto deleted the gabritto/fixcompare branch September 10, 2025 17:12
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.

2 participants