Function offsetAtPosition

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

    Parameters

    • position: CodeEditor.IPosition

      position of cursor

    • lines: string[]

      list of lines to compute the position

    • linesIncludeBreaks: boolean = false

      should count the line break as space? return - offset number

    Returns number