Stop writing a test file in real world usage in some cases

This commit is contained in:
w0rp 2017-08-05 19:51:38 +01:00
parent 666cfc6ee2
commit 747d4fe80b
2 changed files with 5 additions and 1 deletions

View File

@ -43,7 +43,6 @@ function! ale#fix#ApplyQueuedFixes() abort
if empty(&buftype)
noautocmd :w!
else
call writefile(l:data.output, 'fix_test_file')
set nomodified
endif
endif

View File

@ -82,6 +82,8 @@ After:
call ale#fix#registry#ResetToDefaults()
call ale#linter#Reset()
setlocal buftype=nofile
if filereadable('fix_test_file')
call delete('fix_test_file')
endif
@ -245,6 +247,9 @@ Execute(ALEFix should save files on the save event):
let g:ale_fixers.testft = ['AddDollars']
" We have to set the buftype to empty so the file will be written.
setlocal buftype=
call SetUpLinters()
call ale#events#SaveEvent(bufnr(''))