code: protected synchronized void onResized(TerminalSize newSize) {
          if (lastKnownSize == null || !lastKnownSize.equals(newSize)) {
              lastKnownSize = newSize;
              for (TerminalResizeListener resizeListener : resizeListeners) {
                  resizeListener.onResized(this, lastKnownSize);
              }
          }
      }
docs: Call this method when the terminal has been resized or the initial size of the terminal has been discovered. It
  will trigger all resize listeners, but only if the size has changed from before.
  
  @param newSize Last discovered terminal size