code: function addToHistory (state, type, value) {
    let dest
  
    if (type === 'file') {
      dest = utils.getRefFilePath(value)
    } else {
      if (value === '#') {
        return false
      }
      dest = state.current.concat(`:${value}`)
    }
  
    if (dest) {
      dest = dest.toLowerCase()
      if (state.history.indexOf(dest) >= 0) {
        return false
      }
  
      state.history.push(dest)
    }
    return true
  }
docs: Add to state history
  @param {Object} state the state
  @param {String} type ref type
  @param {String} value ref value
  @private