From 01a737ef9a655ef84589cd6396fd34853857df28 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 7 Feb 2013 16:22:12 +0100 Subject: [PATCH] don't select the whole file text in copy reference aciton (IDEA-100443) --- .../src/com/intellij/ide/actions/CopyReferenceAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/ide/actions/CopyReferenceAction.java b/platform/lang-impl/src/com/intellij/ide/actions/CopyReferenceAction.java index ef9ea95891c6..b0bc20c043b3 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/CopyReferenceAction.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/CopyReferenceAction.java @@ -104,7 +104,7 @@ public class CopyReferenceAction extends DumbAwareAction { PsiReference reference = TargetElementUtilBase.findReference(editor, editor.getCaretModel().getOffset()); if (reference != null) { highlightManager.addOccurrenceHighlights(editor, new PsiReference[]{reference}, attributes, true, null); - } else { + } else if (element != PsiDocumentManager.getInstance(project).getCachedPsiFile(editor.getDocument())) { highlightManager.addOccurrenceHighlights(editor, new PsiElement[]{element}, attributes, true, null); } }