diff options
-rw-r--r-- | autoload/ale/history.vim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/autoload/ale/history.vim b/autoload/ale/history.vim index 78703be1..0356c022 100644 --- a/autoload/ale/history.vim +++ b/autoload/ale/history.vim @@ -26,6 +26,11 @@ function! ale#history#Add(buffer, status, job_id, command) abort endfunction 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, " so finding the last one should be good enough. for l:obj in reverse(g:ale_buffer_info[a:buffer].history[:]) |