Vscode-powershell: Symbol renaming incorrectly changes symbols that start with the original symbol's name

Created on 21 Jun 2016  路  4Comments  路  Source: PowerShell/vscode-powershell

Currently it (called "change all occurancies") can only find&replace which is not usefull to refactor (as it also changes comments and unrelated similar variables). This is not like rename.refactor e.g. for C#
Example:

$URI= "http://localhost:8080/"
$URI2= "http://Server2"
$IEexe= "C:\Program Files\Internet Explorer\iexplore.exe" 
& $IEexe $URI
& $IEexe $URI2

renaming $URI to $URIOriginal will also change unrelated $URI2

Area-Code Formatting Issue-Bug

Most helpful comment

Yep, I think there's a bug with the renaming here. We'll get it fixed. Thanks!

All 4 comments

Yep, I think there's a bug with the renaming here. We'll get it fixed. Thanks!

Interesting. If you highlight just "URI" on line one, I can repro your issue.

However, if you don't highlight anything, renaming works as expected.

@TylerLeonhardt I can't reproduce, though there is a difference between "clicking" a symbol and "dragging" over the symbol. Dragging will be any characters you select.

Capture

I think its also important to note that we dont officially support renaming #1440

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GQnzo picture GQnzo  路  3Comments

lukegriffith picture lukegriffith  路  3Comments

guidooliveira picture guidooliveira  路  3Comments

bgelens picture bgelens  路  3Comments

weinand picture weinand  路  4Comments