diff --git a/autoload/ale/list.vim b/autoload/ale/list.vim index 7b84676..6486d90 100644 --- a/autoload/ale/list.vim +++ b/autoload/ale/list.vim @@ -15,7 +15,16 @@ function! ale#list#SetLists(buffer, loclist) abort if g:ale_set_quickfix call setqflist(a:loclist) elseif g:ale_set_loclist - call setloclist(bufwinid(str2nr(a:buffer)), a:loclist) + " If windows support is off, bufwinid() may not exist. + if exists('*bufwinid') + " Set the results on the window for the buffer. + call setloclist(bufwinid(str2nr(a:buffer)), a:loclist) + else + " Set the results in the current window. + " This may not be the same window we ran the linters for, but + " it's better than nothing. + call setloclist(0, a:loclist) + endif endif " If we don't auto-open lists, bail out here.