void (@NotNull ConsoleViewImpl consoleView, @NotNull DataContext context) { Editor editor = consoleView.getEditor(); if (IncrementalSearchHandler.isHintVisible(editor)) { getDefaultActionHandler(myParentActionId).execute(editor, null, context); return; } consoleView.flushDeferredText(); Document document = editor.getDocument(); int length = document.getTextLength(); if (length == 0) { return; } SelectionModel selectionModel = editor.getSelectionModel(); if (selectionModel.hasSelection()) { consoleView.deleteUserText(selectionModel.getSelectionStart(), selectionModel.getSelectionEnd() - selectionModel.getSelectionStart()); } else { int offset = editor.getCaretModel().getOffset() + myTextOffsetToDeleteRelativeToCaret; if (offset >= 0) { consoleView.deleteUserText(offset, 1); } } }