private static int calcLogicalLength(Editor editor, CharSequence lineIndent) {
    int result = 0;
    for (int i = 0; i < lineIndent.length(); i++) {
      if (lineIndent.charAt(i) == '\t') {
        result += EditorUtil.getTabSize(editor);
      } else {
        result++;
      }
    }
    return result;
  }
private static int calcLogicalLength(Editor editor, CharSequence lineIndent)