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

@@ -304,17 +304,19 @@ Execute (#474: Load ftdetect files in filetypedetect augroup):
bd
**********************************************************************
Execute (#489 On-demand loading with 'on' option should trigger BufRead autocmd):
Execute (#489/#587 On-demand loading with 'on' option should trigger BufRead autocmd w/o nomodeline):
call plug#begin('$PLUG_FIXTURES')
Plug 'ftplugin-msg', { 'on': 'XXX' }
call plug#end()
tabnew a.java
call setline(1, '// vim: set filetype=lava:')
redir => out
silent! XXX
redir END
Assert stridx(out, 'ftplugin-java') >= 0
q
AssertEqual 'lava', &filetype
q!
**********************************************************************
Execute (Cursor moved to another window during post-update hook):