code: private <E, F> void maybeEndBlock(State<E, F> state, int contextSize)
      {
          if (!state.getBlocks().isEmpty()) {
              int start = state.getLastDelta().getPrevious().getLastIndex() + 1;
              int end = Math.min(start + contextSize, state.getPrevious().size());
              state.getBlocks().peek().addAll(this.<E, F>getUnmodifiedElements(state.getPrevious(), start, end));
          }
      }
docs: Ends the last {@link UnifiedDiffBlock} by adding a number of unmodified elements.
  
  @param state the state of the displayer
  @param contextSize the number of unmodified elements to display at the end of a block
  @param <E> the type of composite elements that are compared to produce the first level diff
  @param <F> the type of sub-elements that are compared to produce the second-level diff when a composite element
  is modified