summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-06-25 15:57:36 +0100
committerw0rp <devw0rp@gmail.com>2017-06-25 15:57:36 +0100
commit2c6b571e66ed88c769217935a781cc6cbf8b0349 (patch)
treee35d284826bf65513b3fc2d884028e6a04c9866e /autoload
parent4eaa990fe8f1de3c767c6281d413506356999302 (diff)
downloadale-2c6b571e66ed88c769217935a781cc6cbf8b0349.zip
Fix #665 - Stop prompts appearing when fixing files on save
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/fix.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim
index 2e9cf2cc..3e4c2393 100644
--- a/autoload/ale/fix.vim
+++ b/autoload/ale/fix.vim
@@ -28,6 +28,10 @@ function! ale#fix#ApplyQueuedFixes() abort
call remove(g:ale_fix_buffer_data, l:buffer)
if l:data.changes_made
+ if l:data.should_save
+ noautocmd :w!
+ endif
+
call setline(1, l:data.output)
let l:start_line = len(l:data.output) + 1
@@ -76,10 +80,6 @@ function! ale#fix#ApplyFixes(buffer, output) abort
let l:data.done = 1
endif
- if l:data.changes_made && l:data.should_save
- call writefile(a:output, l:data.filename)
- endif
-
if !bufexists(a:buffer)
" Remove the buffer data when it doesn't exist.
call remove(g:ale_fix_buffer_data, a:buffer)