code: function findColumn(string, goal, tabSize) {
      for (var pos = 0, col = 0;;) {
        var nextTab = string.indexOf("\t", pos);
        if (nextTab == -1) nextTab = string.length;
        var skipped = nextTab - pos;
        if (nextTab == string.length || col + skipped >= goal)
          return pos + Math.min(skipped, goal - col);
        col += nextTab - pos;
        col += tabSize - (col % tabSize);
        pos = nextTab + 1;
        if (col >= goal) return pos;
      }
    }
docs: The inverse of countColumn -- find the offset that corresponds to a particular column.