mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-16 01:07:06 +08:00
Revert "Don't save the sign ID on loclist items. This approach won't work."
This reverts commit f25a543260.
This commit is contained in:
@@ -118,12 +118,20 @@ function! ale#sign#SetSigns(buffer, loclist) abort
|
||||
|
||||
" Add the new signs,
|
||||
for l:index in range(0, len(l:signlist) - 1)
|
||||
let l:sign_id = l:index + g:ale_sign_offset + 1
|
||||
let l:sublist = l:signlist[l:index]
|
||||
let l:type = !empty(filter(copy(l:sublist), 'v:val.type ==# ''E'''))
|
||||
\ ? 'ALEErrorSign'
|
||||
\ : 'ALEWarningSign'
|
||||
|
||||
let l:sign_line = 'sign place ' . (l:index + g:ale_sign_offset + 1)
|
||||
" Save the sign IDs we are setting back on our loclist objects.
|
||||
" These IDs can be used later for changing line numbers of items
|
||||
" we keep, based on what Vim adjusts automatically.
|
||||
for l:obj in l:sublist
|
||||
let l:obj.sign_id = l:sign_id
|
||||
endfor
|
||||
|
||||
let l:sign_line = 'sign place ' . l:sign_id
|
||||
\. ' line=' . l:sublist[0].lnum
|
||||
\. ' name=' . l:type
|
||||
\. ' buffer=' . a:buffer
|
||||
|
||||
Reference in New Issue
Block a user