Skip to content

Commit 674e6b9

Browse files
committed
Remove fixed
1 parent eb89c18 commit 674e6b9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

RetailCoder.VBE/Refactorings/RemoveParameters/RemoveParametersRefactoring.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ var param in
139139
}
140140

141141
module.ReplaceLine(paramList.Start.Line, newContent);
142-
module.DeleteLines(paramList.Start.Line + 1, lineCount - 1);
142+
for (var line = paramList.Start.Line + 1; line < paramList.Start.Line + lineCount; line++)
143+
{
144+
module.ReplaceLine(line, "");
145+
}
143146
}
144147

145148
private string GetOldSignature(Declaration target)
@@ -322,7 +325,10 @@ private void RemoveSignatureParameters(Declaration target, VBAParser.ArgListCont
322325
var lineNum = paramList.GetSelection().LineCount;
323326

324327
module.ReplaceLine(paramList.Start.Line, signature);
325-
module.DeleteLines(paramList.Start.Line + 1, lineNum - 1);
328+
for (var line = paramList.Start.Line + 1; line < paramList.Start.Line + lineNum; line++)
329+
{
330+
module.ReplaceLine(line, "");
331+
}
326332
}
327333
}
328334
}

0 commit comments

Comments
 (0)