@Override
  public int logicalPositionToOffset(final @NotNull LogicalPosition pos) {
    int lineStartOffset = myDocumentWindow.getLineStartOffset(pos.line);
    return calcOffset(pos.column, pos.line, lineStartOffset);
  }
@Override
  public int logicalPositionToOffset(final @NotNull LogicalPosition pos)