ale/autoload/ale/cleanup.vim

14 lines
443 B
VimL
Raw Normal View History

" Author: w0rp <devw0rp@gmail.com>
" Description: Utility functions related to cleaning state.
function! ale#cleanup#Buffer(buffer) abort
2016-10-23 21:41:00 +00:00
if has_key(g:ale_buffer_info, a:buffer)
" When buffers are removed, clear all of the jobs.
for l:job in get(g:ale_buffer_info[a:buffer], 'job_list', [])
call ale#engine#ClearJob(l:job)
endfor
2016-10-23 21:41:00 +00:00
call remove(g:ale_buffer_info, a:buffer)
endif
endfunction