Skip to content

Commit 8ca728c

Browse files
committed
fixed reference selection issue
1 parent 6618af5 commit 8ca728c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

RetailCoder.VBE/UI/Refactorings/Rename/RenamePresenter.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@ private void PromptIfTargetImplementsInterface(ref Declaration target)
244244

245245
private bool IsSelectedReference(QualifiedSelection selection, Declaration declaration)
246246
{
247-
return declaration.References.Any(r => r.Selection.ContainsFirstCharacter(selection.Selection));
247+
return declaration.References.Any(r =>
248+
r.QualifiedModuleName == selection.QualifiedName &&
249+
r.Selection.ContainsFirstCharacter(selection.Selection));
248250
}
249251

250252
private bool IsSelectedDeclaration(QualifiedSelection selection, Declaration declaration)

0 commit comments

Comments
 (0)