Function positionAtOffset

  • Given a list of line and an offset from the start, compute the corresponding position in form of line and column number

    Parameters

    • offset: number

      number of spaces counted from the start of first line

    • lines: string[]

      list of lines to compute the position

    Returns CodeEditor.IPosition

    • the position of cursor