Fix #665 - Stop prompts appearing when fixing files on save
This commit is contained in:
parent
4eaa990fe8
commit
2c6b571e66
@ -28,6 +28,10 @@ function! ale#fix#ApplyQueuedFixes() abort
|
|||||||
call remove(g:ale_fix_buffer_data, l:buffer)
|
call remove(g:ale_fix_buffer_data, l:buffer)
|
||||||
|
|
||||||
if l:data.changes_made
|
if l:data.changes_made
|
||||||
|
if l:data.should_save
|
||||||
|
noautocmd :w!
|
||||||
|
endif
|
||||||
|
|
||||||
call setline(1, l:data.output)
|
call setline(1, l:data.output)
|
||||||
|
|
||||||
let l:start_line = len(l:data.output) + 1
|
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
|
let l:data.done = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if l:data.changes_made && l:data.should_save
|
|
||||||
call writefile(a:output, l:data.filename)
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !bufexists(a:buffer)
|
if !bufexists(a:buffer)
|
||||||
" Remove the buffer data when it doesn't exist.
|
" Remove the buffer data when it doesn't exist.
|
||||||
call remove(g:ale_fix_buffer_data, a:buffer)
|
call remove(g:ale_fix_buffer_data, a:buffer)
|
||||||
|
Loading…
Reference in New Issue
Block a user