Use BufWinEnter for g:ale_lint_on_enter instead
This commit is contained in:
parent
3c5156d4a4
commit
e88eb6c415
@ -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.
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user