summaryrefslogtreecommitdiff
path: root/spellchecker/src/com/intellij/spellchecker/quickfixes/RenameTo.java
diff options
context:
space:
mode:
Diffstat (limited to 'spellchecker/src/com/intellij/spellchecker/quickfixes/RenameTo.java')
-rw-r--r--spellchecker/src/com/intellij/spellchecker/quickfixes/RenameTo.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/spellchecker/src/com/intellij/spellchecker/quickfixes/RenameTo.java b/spellchecker/src/com/intellij/spellchecker/quickfixes/RenameTo.java
index 206a5f9510e2..ad742c5a1510 100644
--- a/spellchecker/src/com/intellij/spellchecker/quickfixes/RenameTo.java
+++ b/spellchecker/src/com/intellij/spellchecker/quickfixes/RenameTo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2009 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -102,11 +102,7 @@ public class RenameTo extends ShowSuggestions implements SpellCheckerQuickFix {
} else if (ApplicationManager.getApplication().isUnitTestMode()) { // TextEditorComponent / FiledEditorManagerImpl give away the data in real life
map.put(
CommonDataKeys.PSI_ELEMENT.getName(),
- new TextEditorPsiDataProvider().getData(
- CommonDataKeys.PSI_ELEMENT.getName(),
- editor,
- containingFile.getVirtualFile()
- )
+ new TextEditorPsiDataProvider().getData(CommonDataKeys.PSI_ELEMENT.getName(), editor, editor.getCaretModel().getCurrentCaret())
);
}