add proper events and make the notifier class generic

Expand the event system to have explicit Event objects and potentially
many Notifiers. Previously they was only one notifier and one (implied)
event.

A lot of this is stolen from #358.
This commit is contained in:
Martin Grenfell
2014-07-17 20:16:57 +01:00
parent f9a933991d
commit fd14757c04
6 changed files with 53 additions and 25 deletions

View File

@@ -252,7 +252,7 @@ function! s:TreeDirNode._initChildren(silent)
try
let path = g:NERDTreePath.New(i)
call self.createChild(path, 0)
call g:NERDTreeRefreshNotifier.NotifyListeners(path)
call g:NERDTreePathNotifier.NotifyListeners('init', path, {})
catch /^NERDTree.\(InvalidArguments\|InvalidFiletype\)Error/
let invalidFilesFound += 1
endtry