summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/ale/fix.vim2
-rw-r--r--autoload/ale/util.vim6
2 files changed, 6 insertions, 2 deletions
diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim
index d2c1cb98..69817b36 100644
--- a/autoload/ale/fix.vim
+++ b/autoload/ale/fix.vim
@@ -5,7 +5,7 @@ call ale#Set('fix_on_save_ignore', {})
function! ale#fix#ApplyQueuedFixes(buffer) abort
let l:data = get(g:ale_fix_buffer_data, a:buffer, {'done': 0})
- if !l:data.done
+ if !l:data.done || (!ale#util#HasBuflineApi() && a:buffer isnot bufnr(''))
return
endif
diff --git a/autoload/ale/util.vim b/autoload/ale/util.vim
index b781971c..b7594167 100644
--- a/autoload/ale/util.vim
+++ b/autoload/ale/util.vim
@@ -481,9 +481,13 @@ function! ale#util#Input(message, value) abort
return input(a:message, a:value)
endfunction
+function! ale#util#HasBuflineApi() abort
+ return exists('*deletebufline') && exists('*setbufline')
+endfunction
+
" Sets buffer contents to lines
function! ale#util#SetBufferContents(buffer, lines) abort
- let l:has_bufline_api = exists('*deletebufline') && exists('*setbufline')
+ let l:has_bufline_api = ale#util#HasBuflineApi()
if !l:has_bufline_api && a:buffer isnot bufnr('')
return