File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
src/PowerShellEditorServices/Services/PowerShell/Refactoring Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -291,10 +291,8 @@ public void ProcessNode(Ast node)
291
291
}
292
292
293
293
if ( TargetFunction != null && commandParameterAst . Parent is CommandAst commandAst &&
294
- commandAst . GetCommandName ( ) . ToLower ( ) == TargetFunction . Name . ToLower ( ) && isParam )
294
+ commandAst . GetCommandName ( ) . ToLower ( ) == TargetFunction . Name . ToLower ( ) && isParam && ShouldRename )
295
295
{
296
- if ( ShouldRename )
297
- {
298
296
TextChange Change = new ( )
299
297
{
300
298
NewText = NewName . Contains ( "-" ) ? NewName : "-" + NewName ,
@@ -303,9 +301,7 @@ public void ProcessNode(Ast node)
303
301
EndLine = commandParameterAst . Extent . StartLineNumber - 1 ,
304
302
EndColumn = commandParameterAst . Extent . StartColumnNumber + OldName . Length ,
305
303
} ;
306
-
307
304
Modifications . Add ( Change ) ;
308
- }
309
305
}
310
306
else
311
307
{
You can’t perform that action at this time.
0 commit comments