Don't save the sign ID on loclist items. This approach won't work.
This commit is contained in:
parent
a4ae5ca997
commit
f25a543260
@ -118,20 +118,12 @@ function! ale#sign#SetSigns(buffer, loclist) abort
|
|||||||
|
|
||||||
" Add the new signs,
|
" Add the new signs,
|
||||||
for l:index in range(0, len(l:signlist) - 1)
|
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:sublist = l:signlist[l:index]
|
||||||
let l:type = !empty(filter(copy(l:sublist), 'v:val.type ==# ''E'''))
|
let l:type = !empty(filter(copy(l:sublist), 'v:val.type ==# ''E'''))
|
||||||
\ ? 'ALEErrorSign'
|
\ ? 'ALEErrorSign'
|
||||||
\ : 'ALEWarningSign'
|
\ : 'ALEWarningSign'
|
||||||
|
|
||||||
" Save the sign IDs we are setting back on our loclist objects.
|
let l:sign_line = 'sign place ' . (l:index + g:ale_sign_offset + 1)
|
||||||
" 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
|
\. ' line=' . l:sublist[0].lnum
|
||||||
\. ' name=' . l:type
|
\. ' name=' . l:type
|
||||||
\. ' buffer=' . a:buffer
|
\. ' buffer=' . a:buffer
|
||||||
|
@ -13,7 +13,6 @@ Before:
|
|||||||
\ 'type': 'W',
|
\ 'type': 'W',
|
||||||
\ 'col': 10,
|
\ 'col': 10,
|
||||||
\ 'text': 'Infix operators must be spaced. [Warning/space-infix-ops]',
|
\ 'text': 'Infix operators must be spaced. [Warning/space-infix-ops]',
|
||||||
\ 'sign_id': 1000001,
|
|
||||||
\ },
|
\ },
|
||||||
\ {
|
\ {
|
||||||
\ 'lnum': 2,
|
\ 'lnum': 2,
|
||||||
@ -24,7 +23,6 @@ Before:
|
|||||||
\ 'type': 'E',
|
\ 'type': 'E',
|
||||||
\ 'col': 10,
|
\ 'col': 10,
|
||||||
\ 'text': 'Missing semicolon. [Error/semi]',
|
\ 'text': 'Missing semicolon. [Error/semi]',
|
||||||
\ 'sign_id': 1000002,
|
|
||||||
\ }
|
\ }
|
||||||
\]
|
\]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user