Enter key in editor of Find In Path dialog doesn't work properly
In the old version(older than 171), we can edit the code in Find in Path dialog, we can press enter key to input a new line or input the auto-complete item, while if the other components but the code editor is focused, we press the enter key is same as click the "open in find window".
In the newer version(newer than 171), in the Find in Path dialog, even if the editor is focused, we press the enter key, we can not input a new line or input the auto-complete item, idea do "open in find window" instead of what we hope: input a new line or input the auto-complete item....
I have reviewed the code, the problem comes from:
https://youtrack.jetbrains.com/issue/IDEA-169996 // Users want to exchange ctrl+enter and enter function in 'find in path' dialog.
The following is code commit:
Registry key ide.find.enter.as.ok to swap shortcuts in Find-In-Path
IDEA-169996 The global find (Ctrl+Shift+f) dialogue should show you the list of results when you press Enter, shouldn't have to press Ctrl+Enter
And the diff
In the code, it use AnAction.registerCustomShortcutSet(newer version is DumbAwareAction which is just a sub-class of AnAction) instead of JComponent.registerKeyboardAction(listener, NEW_LINE, WHEN_IN_FOCUSED_WINDOW).
The level of `registerCustomShortcutSet` is much more higner than `registerKeyboardAction`, that means even if in the code editor, when I press the enter key, the dialog is closed and idea `open in find window`
Please sign in to leave a comment.
Thanks!
I've filed IDEA-208816
Best Regards,
Maxim Medvedev
JetBrains
http://www.jetbrains.com
The Drive to Develop