   jump: (direction, withinEditor=false) ->
     return unless editor = atom.workspace.getActiveTextEditor()
     forURI = if withinEditor then editor.getURI() else null
-    needToSave = direction is 'prev' and @history.isIndexAtHead()
+    needToSave = (direction is 'prev') and @history.isIndexAtHead()
     unless entry = @history.get(direction, URI: forURI)
       return
 

      saveLocation(type, target)

    @subscriptions.add atom.commands.onDidDispatch ({type, target}) =>
      return if locationStack.length is 0
      return if type in ignoreCommands
      return unless shouldSaveLocation(type, target)
      # debug "DidDispatch: #{type}"
      delay 100, =>

      'cursor-history:clear',
    ]
    shouldSaveLocation = (type, target) ->
      (':' in type) and target.getModel?()?.getURI?()?

    locationStack = []
    saveLocation = _.debounce (type, target) ->
