Skip to content

Commit

Permalink
Fix #474 - Load ftdetect files in filetypedetect augroup
Browse files Browse the repository at this point in the history
  • Loading branch information
junegunn committed Apr 16, 2016
1 parent 92bcecd commit 0d9efb0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ function! plug#end()
if has_key(plug, 'for')
let types = s:to_a(plug.for)
if !empty(types)
augroup filetypedetect
call s:source(s:rtp(plug), 'ftdetect/**/*.vim', 'after/ftdetect/**/*.vim')
augroup END
endif
for type in types
call s:assoc(lod.ft, type, name)
Expand Down
16 changes: 16 additions & 0 deletions test/regressions.vader
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,19 @@ Execute (#350: Ruby installer failed to unshallow tagged plugin on update):
PlugUpdate
Assert !filereadable(g:plugs['vim-easy-align'].dir.'/.git/shallow')
q

**********************************************************************
Execute (#474: Load ftdetect files in filetypedetect augroup):
call plug#begin('/tmp/plugged')
Plug 'junegunn/rust.vim', { 'for': 'rust', 'commit': '115d321d383eb96d438466c56cc871fcc1bd0faa' }
call plug#end()
PlugInstall
q

tabnew /tmp/any.rs
AssertEqual 'rust', &filetype
Log &filetype
filetype detect
AssertEqual 'rust', &filetype
Log &filetype
bd
1 change: 1 addition & 0 deletions test/run
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ clone_repos() (
done
clone https://github.com/vim-scripts/beauty256.git vim-scripts/beauty256 &
clone https://github.com/junegunn/fzf.git fzf &
clone https://github.com/rust-lang/rust.vim.git junegunn/rust.vim &
clone https://github.com/yous/subsubmodule.git yous/subsubmodule && \
(cd yous/subsubmodule && git submodule update --init --recursive &) &
wait
Expand Down

0 comments on commit 0d9efb0

Please sign in to comment.