private static int getDistance(@Nullable Editor editor, int fixOffset) {
    return fixOffset == -1 || editor == null ? 0 : editor.getCaretModel().getOffset() - fixOffset;
  }
private static int getDistance(@Nullable Editor editor, int fixOffset)