code: public void hide() {
          console.out().print("\33[" + 1 + ";" + terminal.getHeight() + ";r");
          //Erase screen doesn't behave well on windows.
          for (int l = 1; l <= terminal.getHeight(); l++) {
              console.out().print(ansi().cursor(l, 1));
              console.out().print(ansi().eraseLine(Erase.FORWARD));
          }
          console.out().print(ansi().cursor(1, 1));
          flush();
          try {
              terminal.restore();
          } catch (Exception e) {
              //noop
          }
      }
docs: Hides the editor screen and restore the {@link Terminal}.