diff options
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/references.vim | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/autoload/ale/references.vim b/autoload/ale/references.vim index 0e88afe2..b9725e1e 100644 --- a/autoload/ale/references.vim +++ b/autoload/ale/references.vim @@ -49,13 +49,15 @@ function! ale#references#HandleLSPResponse(conn_id, response) abort let l:result = get(a:response, 'result', []) let l:item_list = [] - for l:response_item in l:result - call add(l:item_list, { - \ 'filename': ale#path#FromURI(l:response_item.uri), - \ 'line': l:response_item.range.start.line + 1, - \ 'column': l:response_item.range.start.character + 1, - \}) - endfor + if type(l:result) is v:t_list + for l:response_item in l:result + call add(l:item_list, { + \ 'filename': ale#path#FromURI(l:response_item.uri), + \ 'line': l:response_item.range.start.line + 1, + \ 'column': l:response_item.range.start.character + 1, + \}) + endfor + endif if empty(l:item_list) call ale#util#Execute('echom ''No references found.''') |