Skip to content

Fix function rename symbol edits#172

Merged
adamdriscoll merged 1 commit into
mainfrom
adamdriscoll-fix-rename-symbol
Jul 21, 2026
Merged

Fix function rename symbol edits#172
adamdriscoll merged 1 commit into
mainfrom
adamdriscoll-fix-rename-symbol

Conversation

@adamdriscoll

Copy link
Copy Markdown
Member

Rename Symbol showed the VS Code rename UI for PowerShell functions but returned no edits, so pressing Enter appeared to do nothing.

This adds backend rename support for functions by detecting the function name under the cursor, producing replacement edits for matching local function definitions and same-file call sites, and leaving unrelated commands untouched when no local function definition exists. It also adds host refactoring tests for renaming from both a definition and a reference.

Closes #138

Tests:

  • dotnet test .\PowerShellProTools.Host.Tests\PowerShellProTools.Host.Tests.csproj --no-restore

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@adamdriscoll
adamdriscoll merged commit 7dd22f7 into main Jul 21, 2026
1 check passed
@adamdriscoll
adamdriscoll deleted the adamdriscoll-fix-rename-symbol branch July 21, 2026 22:31
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.

Rename Symbol Does Nothing to a Function

1 participant