void (@NotNull Editor editor, Caret caret, DataContext dataContext) { if (editor.getCaretModel().getCaretCount() == 1) { // Search results highlighting is disabled when the search popup is hidden from the screen, // but in tests it is not working, so we need to disable it manually. var realEditor = editor instanceof EditorWindow window ? window.getDelegate() : editor; var searchSession = EditorSearchSession.get(realEditor); if (searchSession != null) { searchSession.disableLivePreview(); } editor.setHeaderComponent(null); Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project != null) { HighlightManagerImpl highlightManager = (HighlightManagerImpl)HighlightManager.getInstance(project); if (highlightManager != null && highlightManager.hideHighlights(editor, HIDE_BY_ESCAPE | HIDE_BY_ANY_KEY)) { StatusBar statusBar = WindowManager.getInstance().getStatusBar(project); if (statusBar != null) { statusBar.setInfo(""); } FindManager findManager = FindManager.getInstance(project); if (findManager != null) { FindModel model = findManager.getFindNextModel(editor); if (model != null) { model.setSearchHighlighters(false); findManager.setFindNextModel(model); } } return; } } } myOriginalHandler.execute(editor, caret, dataContext); }