@Override
  public List<TerminalAction> getActions() {
    List<TerminalAction> actions = super.getActions();
    String clearBufferActionName = mySettingsProvider.getClearBufferActionPresentation().getName();
    TerminalAction clearBufferAction = ContainerUtil.find(actions, action -> action.getName().equals(clearBufferActionName));
    if (clearBufferAction != null) {
      clearBufferAction.withEnabledSupplier(() -> {
        if (getTerminalTextBuffer().isUsingAlternateBuffer()) {
          return false;
        }
        JBTerminalWidget terminalWidget = DataManager.getInstance().getDataContext(this).getData(JBTerminalWidget.TERMINAL_DATA_KEY);
        if (terminalWidget == null || terminalWidget.getTerminalPanel() != this) {
          return false;
        }
        ProcessTtyConnector connector = terminalWidget.getProcessTtyConnector();
        WinConPtyProcess winConPtyProcess = connector != null ? ObjectUtils.tryCast(connector.getProcess(), WinConPtyProcess.class) : null;
        return winConPtyProcess == null;
      });
    }
    return actions;
  }
@Override
  public List<TerminalAction> getActions()