mirror of
https://github.com/dense-analysis/ale
synced 2025-01-20 06:30:58 +00:00
#394 Attempt to fix running linters when bufwinid() doesn't exist
This commit is contained in:
parent
fae26369d4
commit
6f0fc965ab
@ -15,7 +15,16 @@ function! ale#list#SetLists(buffer, loclist) abort
|
|||||||
if g:ale_set_quickfix
|
if g:ale_set_quickfix
|
||||||
call setqflist(a:loclist)
|
call setqflist(a:loclist)
|
||||||
elseif g:ale_set_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
|
endif
|
||||||
|
|
||||||
" If we don't auto-open lists, bail out here.
|
" If we don't auto-open lists, bail out here.
|
||||||
|
Loading…
Reference in New Issue
Block a user