Skip to content

Commit 00765f0

Browse files
committed
Merge pull request #626 from Hosch250/next
Stop reinventing the wheel
2 parents c5a453f + 4c1a08d commit 00765f0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

RetailCoder.VBE/Refactorings/RemoveParameters/RemoveParametersModel.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ private IEnumerable<Declaration> GetParameters(Declaration method)
5252
.Where(d => d.DeclarationType == DeclarationType.Parameter
5353
&& d.ComponentName == method.ComponentName
5454
&& d.Project.Equals(method.Project)
55-
&& method.Context.Start.Line <= d.Selection.StartLine
56-
&& method.Context.Stop.Line >= d.Selection.EndLine
57-
&& !(method.Context.Start.Column > d.Selection.StartColumn && method.Context.Start.Line == d.Selection.StartLine)
58-
&& !(method.Context.Stop.Column < d.Selection.EndColumn && method.Context.Stop.Line == d.Selection.EndLine))
55+
&& method.Context.GetSelection().Contains(
56+
new Selection(d.Selection.StartLine,
57+
d.Selection.StartColumn,
58+
d.Selection.EndLine,
59+
d.Selection.EndColumn)))
5960
.OrderBy(item => item.Selection.StartLine)
6061
.ThenBy(item => item.Selection.StartColumn);
6162
}

0 commit comments

Comments
 (0)