code: function updatePosition(subvalue) {
        var lastIndex = -1
        var index = subvalue.indexOf('\n')
  
        while (index !== -1) {
          line++
          lastIndex = index
          index = subvalue.indexOf('\n', index + 1)
        }
  
        if (lastIndex === -1) {
          column += subvalue.length
        } else {
          column = subvalue.length - lastIndex
        }
  
        if (line in offset) {
          if (lastIndex !== -1) {
            column += offset[line]
          } else if (column <= offset[line]) {
            column = offset[line] + 1
          }
        }
      }
docs: Update line, column, and offset based on `value`.