summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/ale.vim2
-rw-r--r--test/test_ale_init_au_groups.vader6
2 files changed, 4 insertions, 4 deletions
diff --git a/plugin/ale.vim b/plugin/ale.vim
index 50735753..00c24ce6 100644
--- a/plugin/ale.vim
+++ b/plugin/ale.vim
@@ -239,7 +239,7 @@ function! ALEInitAuGroups() abort
augroup ALERunOnSaveGroup
autocmd!
if (g:ale_enabled && g:ale_lint_on_save) || g:ale_fix_on_save
- autocmd BufWrite * call ale#events#SaveEvent()
+ autocmd BufWritePost * call ale#events#SaveEvent()
endif
augroup END
diff --git a/test/test_ale_init_au_groups.vader b/test/test_ale_init_au_groups.vader
index 42dd763e..c20f4f97 100644
--- a/test/test_ale_init_au_groups.vader
+++ b/test/test_ale_init_au_groups.vader
@@ -151,7 +151,7 @@ Execute (g:ale_lint_on_save = 1 should bind no events):
let g:ale_fix_on_save = 0
AssertEqual [
- \ 'BufWritePre * call ale#events#SaveEvent()',
+ \ 'BufWritePost * call ale#events#SaveEvent()',
\], CheckAutocmd('ALERunOnSaveGroup')
Execute (g:ale_lint_on_save = 0 and g:ale_fix_on_save = 1 should bind events):
@@ -159,7 +159,7 @@ Execute (g:ale_lint_on_save = 0 and g:ale_fix_on_save = 1 should bind events):
let g:ale_fix_on_save = 1
AssertEqual [
- \ 'BufWritePre * call ale#events#SaveEvent()',
+ \ 'BufWritePost * call ale#events#SaveEvent()',
\], CheckAutocmd('ALERunOnSaveGroup')
Execute (g:ale_fix_on_save = 1 should bind events even when ALE is disabled):
@@ -168,7 +168,7 @@ Execute (g:ale_fix_on_save = 1 should bind events even when ALE is disabled):
let g:ale_fix_on_save = 1
AssertEqual [
- \ 'BufWritePre * call ale#events#SaveEvent()',
+ \ 'BufWritePost * call ale#events#SaveEvent()',
\], CheckAutocmd('ALERunOnSaveGroup')
Execute (g:ale_echo_cursor = 0 should bind no events):