Add old check for bufline api
This commit is contained in:
parent
463deedc29
commit
493705336c
2 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in a new issue