@Override
  public int getSpacingForBlockAtOffset(FormattingModel model, int offset) {
    SpacingImpl spacing = getSpacingBeforeBlockAtOffset(model, offset);
    if (spacing != null) {
      int minSpaces = spacing.getMinSpaces();
      if (minSpaces >= 0) {
        return minSpaces;
      }
    }
    return -1;
  }
@Override
  public int getSpacingForBlockAtOffset(FormattingModel model, int offset)