Skip to content

Fix rename suggestions#279360

Merged
benibenj merged 1 commit intomainfrom
benibenj/immediate-dormouse
Nov 25, 2025
Merged

Fix rename suggestions#279360
benibenj merged 1 commit intomainfrom
benibenj/immediate-dormouse

Conversation

@benibenj
Copy link
Contributor

@benibenj benibenj commented Nov 25, 2025

Copilot Generated Description: Update the rename suggestion logic to ensure that the old name matches the text before allowing a rename to proceed.

fixes https://github.com/microsoft/vscode-copilot-issues/issues/367

Copilot AI review requested due to automatic review settings November 25, 2025 13:16
@benibenj benibenj enabled auto-merge November 25, 2025 13:16
@benibenj benibenj self-assigned this Nov 25, 2025
@vs-code-engineering vs-code-engineering bot added this to the November 2025 milestone Nov 25, 2025
Copy link
Contributor

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 adds a validation check to the rename suggestion logic in the inline completions feature. The fix ensures that the text identified at the rename position by the language service matches the expected old name before allowing a rename operation to proceed, preventing incorrect rename suggestions when symbols don't match expectations.

Key Changes

  • Added loc.text === oldName validation to the renamePossible condition to ensure rename suggestions are only created when the symbol at the position matches what was identified by diff analysis

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@benibenj benibenj merged commit b1018f0 into main Nov 25, 2025
33 of 34 checks passed
@benibenj benibenj deleted the benibenj/immediate-dormouse branch November 25, 2025 14:02
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Jan 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants