Refactor rename in place - confirm refactoring with return key
Answered
Suddenly, my installation of IntelliJ IDEA Ultimate shows erratic behaviour when refactoring in-place. Say I'm trying to rename class MyClass to AnotherClass, I'd normally do:
- Shift + F6 on MyClass
- Type AnotherClass
- Press the return key
However, on step 3, the editor inserts a newline, instead of confirming the refactoring. In the preferences, in Editor > General > Refactorings, all boxes have been ticked.
Any ideas why this is not behaving like it should?
Please sign in to leave a comment.
This bug has been fixed in EAP version of IntelliJ IDEA:
https://youtrack.jetbrains.com/issue/IDEA-211276
I've just installed the EAP version, but it shows the same behaviour as I described above. When I press return, it inserts a newline instead of confirm the refactoring.
Not reproduced for me (see the video).
Can you share the build number? Is it #IU-193.4778.7? Share the information from **Help | Collect troubleshooting information**.
Here's a demo of how the refactor is behaving here: https://www.dropbox.com/s/tu2iswn5m2uvv33/rename-refactor.mov
Below versions are installed on my machine and are affected:
Are you hitting Enter (not Cmd+Enter, or Ctrl+Enter) after renaming?

Can you try to reproduce the issue on a fresh installation (Without custom plugins and settings importing)?
Do you have the "Split Line" action assigned to "Enter"? This action could insert a line break in the function's name.
So it seems that it's somewhere in my imported settings. I've did a clean install of the EAP release, without importing settings, and refactoring in place works as it should there (accidental split line is not the issue here).
I've checked the keymap, and it seems that the option Next Template Variable or Finish In-Place Refactoring did not have return assigned to it. When I added that, refactoring in place works as it should again. Thanks for the help Konstantin!