5734 - inline rename - hit ENTER accepts suggestion not what I typed

I found an annoying behavior of the inline rename. If I attempt to rename
a variable, e.g. "iter" in code below, it automatically shows me a list of suggestions, e.g. "iterator". If I go ahead and type "i" and then hit ENTER, it doesn't change it to "i" but instead accepts the suggestion "iterator". Argh!

Now if I turn off the inline rename (Editor->Behavior->Rename local variables in place), so that it uses the old Rename Dialog, notice that it doesn't automatically popup the suggestions. I can type "i" and hit ENTER and it changes "iter" to "i". In the Rename Dialog, you have to hit DOWN ARROW to see a list of choices.

I think it should work the same way for inline rename.

Comment actions Permalink

There's an additional, related annoyance:
"Pos 1" and "End" keys change the selection in the list, rather than moving the caret to the start/end of the word.

I have switched back to "dialog rename" long ago, because the inline rename is more hassle than it's worth.

Comment actions Permalink

I think that problem would also be fixed if they only display the suggestion dropdown menu when you press DOWN ARROW instead of it automatically displaying.

Then Home/End keys will work as expected and work the same as they do in the Dialog rename.

I have filed Jira:

Inline replace - Suggested name dropdown should only appear when DOWN ARROW is pressed, same as Dialog Replace.

I hope they can be fixed before Demetra ships or else in the 6.0.1 release. It really detracts from the useability.

Comment actions Permalink

Yes, I keep getting caught by this... I think I'll switch back to the dialog too.

Comment actions Permalink

enter always accepts the selected suggestion if there is one.
if you want to rename the variable to what is currently entered, just press escape.

Comment actions Permalink

Yes, you can hit ESC and then press ENTER, but the point still stands that the behavior is different between Inline Rename and the Dialog Rename.

To reiterate, in the example above, if I do the following:
1. Invoke Refactor->Rename on "iter".
2. Type "i"
3. press ENTER

Different behavior happens depending whether I have Inline Rename enabled:

Dialog Rename: "iter" becomes "i" as expected.

Inline Rename: "iter" becomes "iterator" because "iterator" was first choice in suggestion dropdown list which is displayed by default.

Comment actions Permalink

Yep, this does irritate me as well.

I'm not sure why the smart-completion can't be triggered in the normal way for variable names, rather than defaulting to being turned on.


Please sign in to leave a comment.