Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not reset ftplugin when no filetype has specified #42

Closed
wants to merge 1 commit into from
Closed

Do not reset ftplugin when no filetype has specified #42

wants to merge 1 commit into from

Conversation

lambdalisue
Copy link
Contributor

First of all, reseting ftplugin is only required when the current buffer has filetype.
Reseting ftplugin cause incorrect autocmd order (FileType -> BufReadPost rather than
BufReadPost -> FileType) and that cause unexpected behavior.

See: Shougo/unite.vim#1137


ftplugin のリセットにより autocmd の呼び出し順番が変わり ftplugin/xxxxx.vim の適用が 初回だけ うまく行かないという現象を修正する PR です。
ftplugin のリセットは &filetype が存在しない場合には意味がないだろうという予想のもとこのような修正にしているので、これで問題が発生しないかは自信がありません。
そのあたりを含めてレビューお願いいたします。

First of all, reseting ftplugin is only required when the current buffer has filetype.
Reseting ftplugin cause incorrect autocmd order (FileType -> BufReadPost rather than
BufReadPost -> FileType) and that cause unexpected behavior.

See: Shougo/unite.vim#1137
@Shougo
Copy link
Owner

Shougo commented Mar 19, 2016

I have fixed the behavior. Please test it.

@Shougo Shougo closed this Mar 19, 2016
@lambdalisue lambdalisue deleted the hotfix/filetype_autocmd_issue branch March 19, 2016 08:03
@lambdalisue
Copy link
Contributor Author

I tried with #44 and confirmed that the problem is fixed. Thanks :-)

delphinus pushed a commit to delphinus/dein.vim that referenced this pull request Apr 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants