diff --git a/platform/lang-impl/src/com/intellij/refactoring/introduce/inplace/InplaceVariableIntroducer.java b/platform/lang-impl/src/com/intellij/refactoring/introduce/inplace/InplaceVariableIntroducer.java index 1aec76c45211..f070a649e425 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/introduce/inplace/InplaceVariableIntroducer.java +++ b/platform/lang-impl/src/com/intellij/refactoring/introduce/inplace/InplaceVariableIntroducer.java @@ -148,11 +148,6 @@ public abstract class InplaceVariableIntroducer extends In protected void collectAdditionalElementsToRename(List> stringUsages) { } - @Override - protected int restoreCaretOffset(int offset) { - return myCaretRangeMarker.isValid() ? myCaretRangeMarker.getStartOffset() : offset; - } - @Override protected String getCommandName() { return myTitle; diff --git a/platform/lang-impl/src/com/intellij/refactoring/rename/inplace/InplaceRefactoring.java b/platform/lang-impl/src/com/intellij/refactoring/rename/inplace/InplaceRefactoring.java index cd1797075c0c..f29b13bdb06d 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/rename/inplace/InplaceRefactoring.java +++ b/platform/lang-impl/src/com/intellij/refactoring/rename/inplace/InplaceRefactoring.java @@ -354,7 +354,7 @@ public abstract class InplaceRefactoring { } protected int restoreCaretOffset(int offset) { - return offset; + return myCaretRangeMarker.isValid() ? myCaretRangeMarker.getStartOffset() : offset; } protected void navigateToAlreadyStarted(Document oldDocument, int exitCode) {