diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim index 428ea8d..873e4b8 100644 --- a/autoload/ale/fix.vim +++ b/autoload/ale/fix.vim @@ -40,7 +40,11 @@ function! ale#fix#ApplyQueuedFixes() abort endif if l:data.should_save - noautocmd :w! + if empty(&buftype) + noautocmd :w! + else + set nomodified + endif endif endif diff --git a/test/test_ale_fix.vader b/test/test_ale_fix.vader index 0974d10..14967fa 100644 --- a/test/test_ale_fix.vader +++ b/test/test_ale_fix.vader @@ -239,6 +239,7 @@ Execute(ALEFix should save files on the save event): let g:ale_enabled = 1 noautocmd silent file fix_test_file + noautocmd :w let g:ale_fixers.testft = ['AddDollars']