void (@NotNull AnActionEvent e) { EditorSearchSession search = e.getData(EditorSearchSession.SESSION_KEY); if (search == null) { e.getPresentation().setEnabledAndVisible(false); return; } 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.update(search.getEditor(), e.getPresentation(), e.getDataContext()); } }