Add a check to make tests fail less
This commit is contained in:
parent
c41afa2b0d
commit
3ca70cb841
@ -26,6 +26,11 @@ function! ale#history#Add(buffer, status, job_id, command) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:FindHistoryItem(buffer, job_id) abort
|
function! s:FindHistoryItem(buffer, job_id) abort
|
||||||
|
" Stop immediately if there's nothing set up for the buffer.
|
||||||
|
if !has_key(g:ale_buffer_info, a:buffer)
|
||||||
|
return {}
|
||||||
|
endif
|
||||||
|
|
||||||
" Search backwards to find a matching job ID. IDs might be recycled,
|
" Search backwards to find a matching job ID. IDs might be recycled,
|
||||||
" so finding the last one should be good enough.
|
" so finding the last one should be good enough.
|
||||||
for l:obj in reverse(g:ale_buffer_info[a:buffer].history[:])
|
for l:obj in reverse(g:ale_buffer_info[a:buffer].history[:])
|
||||||
|
Loading…
Reference in New Issue
Block a user