 
     @disposables.add atom.workspace.onDidDestroyPaneItem ({item}) =>
       @model.search() if @model.scope is 'open'
+
+    @disposables.add atom.workspace.observeTextEditors (editor) =>
+      @disposables.add editor.onDidSave => @model.search()
 
     @scopeButton.on 'click', @toggleSearchScope
     @optionsButton.on 'click', @toggleOptions

    @disposables.add pane.observeFlexScale (flexScale) =>
      @savePaneFlex(flexScale)

    @disposables.add atom.config.observe 'todo-show.liveRefresh', (newValue) =>
      @liveRefresh = newValue

    @disposables.add @model.onDidChangeSearchScope @setScopeButtonState
    @disposables.add @model.onDidStartSearch @startLoading
    @disposables.add @model.onDidFinishSearch @stopLoading

{CompositeDisposable} = require 'atom'
{ScrollView} = require 'atom-space-pen-views'
path = require 'path'
fs = require 'fs-plus'
