Fix #687 - Check files on enter if they have changed

This commit is contained in:
w0rp committed 2017-06-24 12:24:31 +01:00
1 parent fbf8ccb882
commit 1ea61162a0
5 files changed
+107 -1

No files matched your search

+19
View File
@@ -12,3 +12,22 @@ function! ale#events#SaveEvent() abort
call ale#Queue(0, 'lint_file')
endif
endfunction
function! s:LintOnEnter() abort
if g:ale_enabled && g:ale_lint_on_enter && has_key(b:, 'ale_file_changed')
call remove(b:, 'ale_file_changed')
call ale#Queue(0, 'lint_file')
endif
endfunction
function! ale#events#EnterEvent() abort
call s:LintOnEnter()
endfunction
function! ale#events#FileChangedEvent(buffer) abort
call setbufvar(a:buffer, 'ale_file_changed', 1)
if bufnr('') == a:buffer
call s:LintOnEnter()
endif
endfunction