Do not use nomodeline when triggering BufRead

Close #587
This commit is contained in:
Junegunn Choi
2017-02-03 13:27:10 +09:00
parent 359a65230e
commit d1ac3cdd1f
2 changed files with 8 additions and 3 deletions

View File

@@ -426,7 +426,10 @@ function! s:dobufread(names)
let path = s:rtp(g:plugs[name]).'/**'
for dir in ['ftdetect', 'ftplugin']
if len(finddir(dir, path))
return s:doautocmd('BufRead')
if exists('#BufRead')
doautocmd BufRead
endif
return
endif
endfor
endfor