Skip to content

Commit 081dd4a

Browse files
committed
Change && to || to fix just-caught bug.
1 parent b8968c6 commit 081dd4a

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)