File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,18 +151,18 @@ private List<CorrectionExtent> GetCorrections(
151151 // TODO Do not incrementally correct the text as it may lead to a situation in which a following
152152 // edits might try to modify edits that have already taken place.
153153 // A better approach is to gather all the edits and give them to the text edit class to handle.
154- if ( whatIfIndex != - 1 )
155- {
156- correctionExtents . Add ( GetCorrectionExtent ( whatIfIndex , parameterAsts ) ) ;
157- }
158-
159- if ( confirmIndex != - 1 )
160- {
161- correctionExtents . Add ( GetCorrectionExtent ( confirmIndex , parameterAsts ) ) ;
162- }
163154
164155 if ( paramBlockAst != null )
165156 {
157+ if ( whatIfIndex != - 1 )
158+ {
159+ correctionExtents . Add ( GetCorrectionExtent ( whatIfIndex , parameterAsts ) ) ;
160+ }
161+
162+ if ( confirmIndex != - 1 )
163+ {
164+ correctionExtents . Add ( GetCorrectionExtent ( confirmIndex , parameterAsts ) ) ;
165+ }
166166 AttributeAst attributeAst ;
167167 // check if it has cmdletbinding attribute
168168 if ( TryGetCmdletBindingAttribute ( paramBlockAst , out attributeAst ) )
You can’t perform that action at this time.
0 commit comments