From c2138a2656a2aa6306921f71a2a5ee7c4c690c1f Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 25 Jun 2017 16:14:04 +0100 Subject: [PATCH] Fix the tests for the fix on save feature --- autoload/ale/fix.vim | 6 +++++- test/test_ale_fix.vader | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) 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']