diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim index 9fe9956..abb6afe 100644 --- a/autoload/ale/fix.vim +++ b/autoload/ale/fix.vim @@ -41,6 +41,12 @@ function! ale#fix#ApplyQueuedFixes() abort silent execute l:start_line . ',' . l:end_line . 'd' call winrestview(l:save) endif + + " If ALE linting is enabled, check for problems with the file again after + " fixing problems. + if g:ale_enabled + call ale#Queue(g:ale_lint_delay) + endif endfunction function! s:ApplyFixes(buffer, output) abort diff --git a/test/test_ale_fix.vader b/test/test_ale_fix.vader index 71fd84f..04657e9 100644 --- a/test/test_ale_fix.vader +++ b/test/test_ale_fix.vader @@ -1,5 +1,6 @@ Before: - Save g:ale_fixers, &shell + Save g:ale_fixers, &shell, g:ale_enabled + let g:ale_enabled = 0 let g:ale_run_synchronously = 1 let g:ale_fixers = { \ 'testft': [], @@ -31,6 +32,7 @@ Before: function RemoveLastLine(buffer, lines) abort return ['a', 'b'] endfunction + After: Restore unlet! g:ale_run_synchronously