private void flush(@NotNull Chunk chunk) {
    if (chunk.myTextEndsWithNewline != null) {
      myFlushedChunksEndWithNewline = chunk.myTextEndsWithNewline;
    }
    myLastFlushedChunkBaseOutputType = chunk.myBaseOutputType;
    myLastFlushedChunkCreatedNanoTime = chunk.myCreatedNanoTime;
    chunk.myFlushRunnable.run();
  }
private void flush(@NotNull Chunk chunk)