diff options
author | w0rp <devw0rp@gmail.com> | 2017-06-06 17:01:17 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-06-06 17:01:17 +0100 |
commit | e88eb6c4157a6f5b517588a632c0dae6eb79fcea (patch) | |
tree | 6c9a0a45038a72cf06e77b9088cfb8cd500d6b8b | |
parent | 3c5156d4a4e700adae32866b5978a941199ade2a (diff) | |
download | ale-e88eb6c4157a6f5b517588a632c0dae6eb79fcea.zip |
Use BufWinEnter for g:ale_lint_on_enter instead
-rw-r--r-- | doc/ale.txt | 6 | ||||
-rw-r--r-- | plugin/ale.vim | 2 | ||||
-rw-r--r-- | test/test_ale_init_au_groups.vader | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/doc/ale.txt b/doc/ale.txt index f51c643e..955e3879 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -393,9 +393,9 @@ g:ale_lint_on_enter *g:ale_lint_on_enter* Type: |Number| Default: `1` - When this option is set to `1`, the |BufEnter| and |BufRead| events will be - used to apply linters when buffers are first opened. If this is not desired, - this variable can be set to `0` in your vimrc file to disable this + When this option is set to `1`, the |BufWinEnter| and |BufRead| events will + be used to apply linters when buffers are first opened. If this is not + desired, this variable can be set to `0` in your vimrc file to disable this behaviour. diff --git a/plugin/ale.vim b/plugin/ale.vim index 4a3f6522..2bc0c103 100644 --- a/plugin/ale.vim +++ b/plugin/ale.vim @@ -205,7 +205,7 @@ function! ALEInitAuGroups() abort augroup ALERunOnEnterGroup autocmd! if g:ale_enabled && g:ale_lint_on_enter - autocmd BufEnter,BufRead * call ale#Queue(300, 'lint_file') + autocmd BufWinEnter,BufRead * call ale#Queue(300, 'lint_file') endif augroup END diff --git a/test/test_ale_init_au_groups.vader b/test/test_ale_init_au_groups.vader index 503b7c2b..7cc3e6a6 100644 --- a/test/test_ale_init_au_groups.vader +++ b/test/test_ale_init_au_groups.vader @@ -112,12 +112,12 @@ Execute (g:ale_lint_on_enter = 0 should bind no events): AssertEqual [], CheckAutocmd('ALERunOnEnterGroup') -Execute (g:ale_lint_on_enter = 1 should bind no BufReadPost and BufEnter): +Execute (g:ale_lint_on_enter = 1 should bind no BufReadPost and BufWinEnter): let g:ale_lint_on_enter = 1 AssertEqual [ - \ 'BufEnter * call ale#Queue(300, ''lint_file'')', \ 'BufReadPost * call ale#Queue(300, ''lint_file'')', + \ 'BufWinEnter * call ale#Queue(300, ''lint_file'')', \], CheckAutocmd('ALERunOnEnterGroup') Execute (g:ale_lint_on_filetype_changed = 0 should bind no events): |