summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/ale/fix.vim6
-rw-r--r--test/test_ale_fix.vader1
2 files changed, 6 insertions, 1 deletions
diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim
index 428ea8d8..873e4b83 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 0974d10b..14967fa9 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']