-
Notifications
You must be signed in to change notification settings - Fork 325
Description
Describe the bug
When applying a rename refactoring to a function that defines a generic type parameter and a function parameter being selected, the popup preselects an invalid portion of the text, not matching the position of the parameter. The range in the popup is shifted toward the end by the length of the generic type parameter.
To Reproduce
Steps to reproduce the behavior:
- Declare a function with a generic type parameter and a regular parameter.
- Select the parameter symbol.
- Press F2 to rename the symbol.
- Observe that the selection in the popup is shifted toward the end of the line.
Expected behavior
The preselected range in the popup should match the actual position of the function parameter.
Environment
- OS: macOS 26.1 (25B78)
- Swift version: Apple Swift version 6.2.1 (swift-6.2.1-RELEASE)
- Visual Studio Code version: 1.106.2 (Universal)
- vscode-swift version: 2.14.1
Additional context
I tried to find the range-computation logic in the extension code, but it seems that the LSP provides the refactoring range somewhere around here. Since this affects the extension’s usability, I thought it would be most efficient if the issue is communicated between both projects, rather than me reporting it directly to the LSP repo.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status