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)
291291 }
292292
293293 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 )
295295 {
296- if ( ShouldRename )
297- {
298296 TextChange Change = new ( )
299297 {
300298 NewText = NewName . Contains ( "-" ) ? NewName : "-" + NewName ,
@@ -303,9 +301,7 @@ public void ProcessNode(Ast node)
303301 EndLine = commandParameterAst . Extent . StartLineNumber - 1 ,
304302 EndColumn = commandParameterAst . Extent . StartColumnNumber + OldName . Length ,
305303 } ;
306-
307304 Modifications . Add ( Change ) ;
308- }
309305 }
310306 else
311307 {
You can’t perform that action at this time.
0 commit comments