Skip to content

Commit 5543b85

Browse files
committed
Merge pull request #916 from Hosch250/BugBlipper
Change && to || to fix just-caught Extract Method bug.
2 parents 877c454 + 081dd4a commit 5543b85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RetailCoder.VBE/Refactorings/ExtractMethod/ExtractMethodModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public ExtractMethodModel(IActiveCodePaneEditor editor, IEnumerable<Declaration>
3333
.ToList();
3434

3535
var usedInSelection = new HashSet<Declaration>(inScopeDeclarations.Where(item =>
36-
selection.Selection.Contains(item.Selection) &&
36+
selection.Selection.Contains(item.Selection) ||
3737
item.References.Any(reference => inSelection.Contains(reference))));
3838

3939
var usedBeforeSelection = new HashSet<Declaration>(inScopeDeclarations.Where(item =>

0 commit comments

Comments
 (0)