mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 20:03:48 -05:00
Put Callback function variables in local scope. (#1230)
* Put `Callback` function variables in local scope. This change prevents conflict with other `Callback` functions that are defined elsewhere in global scope. * Update version number in change log.
This commit is contained in:
@@ -15,8 +15,8 @@ function! s:Notifier.NotifyListeners(event, path, nerdtree, params)
|
||||
let event = g:NERDTreeEvent.New(a:nerdtree, a:path, a:event, a:params)
|
||||
|
||||
for Listener in s:Notifier.GetListenersForEvent(a:event)
|
||||
let Callback = type(Listener) == type(function('tr')) ? Listener : function(Listener)
|
||||
call Callback(event)
|
||||
let l:Callback = type(Listener) == type(function('tr')) ? Listener : function(Listener)
|
||||
call l:Callback(event)
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user