Trigger netrw autocommand when opening directory

This commit is contained in:
Jacob Niehus 2015-10-08 18:32:48 -07:00
parent 1da065e50e
commit ed893c5f47

View File

@ -416,6 +416,9 @@ function! s:cmd_callback(lines) abort
set noautochdir set noautochdir
for item in a:lines for item in a:lines
execute cmd s:escape(item) execute cmd s:escape(item)
if exists('#BufEnter') && isdirectory(item)
doautocmd BufEnter
endif
endfor endfor
finally finally
let &autochdir = autochdir let &autochdir = autochdir