           # So we can't use TexitEditor::getCursorBufferPosition(), fotunately,
           # FileView serialize buffer state initaially, we use this.
           onDidShow: =>
-            @debug "Shown FileView"
+            debug "Shown FileView"
             editor = @getEditor()
             point  = panel.getItem().initialState?.bufferRanges[0].start
             {editor, point}
           onDidHide: =>
-            @debug "Hidden FileView"
+            debug "Hidden FileView"
             editor = @getEditor()
             point  = @getPosition editor
             {editor, point}

  getEditor: ->
    atom.workspace.getActiveTextEditor()

  getPosition: (editor=@getEditor())->
    editor.getCursorBufferPosition()

  dump: ->
    console.log @isLocked()
    @history.dump '', true

  debug: (msg) ->
    return unless settings.get('debug')
    console.log msg

{CompositeDisposable, TextEditor} = require 'atom'
path = require 'path'

History    = null
LastEditor = null
Flasher    = null
settings   = require './settings'

delay = (ms, func) ->
  setTimeout ->
    func()
  , ms

debug = (msg) ->
  return unless settings.get('debug')
  console.log msg

module.exports =
  config:     settings.config
