void (@NotNull AnActionEvent e) { EditorSearchSession search = e.getRequiredData(EditorSearchSession.SESSION_KEY); if (KeymapUtil.isEmacsKeymap()) { // Emacs users are accustomed to the editor that executes 'find next' on subsequent pressing of shortcut that // activates 'incremental search'. Hence, we do the similar hack here for them. final EditorAction action = (EditorAction)ActionManager.getInstance().getAction(IdeActions.ACTION_FIND_NEXT); action.actionPerformed(search.getEditor(), e.getDataContext()); return; } final FindModel findModel = search.getFindModel(); if (findModel.isReplaceState()) { findModel.setReplaceState(false); } search.getComponent().getSearchTextComponent().selectAll(); }