diff options
author | w0rp <devw0rp@gmail.com> | 2017-05-31 10:27:29 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-05-31 10:27:35 +0100 |
commit | fd49f7df90f8454df2f5d9fbc07b065807b1bb4b (patch) | |
tree | 95bff1417d176a3b3669c0434610a9efd109e6fd /autoload | |
parent | e72dc1acd58b6de742ca3fbc69a197549e7c18dd (diff) | |
download | ale-fd49f7df90f8454df2f5d9fbc07b065807b1bb4b.zip |
#604 Change match_id to match_id_list, for future highlights spanning more than 8 lines
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/highlight.vim | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/autoload/ale/highlight.vim b/autoload/ale/highlight.vim index 60ae393e..2240c595 100644 --- a/autoload/ale/highlight.vim +++ b/autoload/ale/highlight.vim @@ -55,9 +55,9 @@ function! s:GetCurrentMatchIDs(loclist) abort let l:current_id_map = {} for l:item in a:loclist - if has_key(l:item, 'match_id') - let l:current_id_map[l:item.match_id] = 1 - endif + for l:id in get(l:item, 'match_id_list', []) + let l:current_id_map[l:id] = 1 + endfor endfor return l:current_id_map @@ -85,7 +85,7 @@ function! ale#highlight#UpdateHighlights() abort endif " Remove anything with a current match_id - call filter(l:loclist, '!has_key(v:val, ''match_id'')') + call filter(l:loclist, '!has_key(v:val, ''match_id_list'')') " Restore items from the map of hidden items, " if we don't have some new items to set already. @@ -117,7 +117,7 @@ function! ale#highlight#UpdateHighlights() abort " Rememeber the match ID for the item. " This ID will be used to preserve loclist items which are set " many times. - let l:item.match_id = matchaddpos(l:group, [[l:line, l:col, l:size]]) + let l:item.match_id_list = [matchaddpos(l:group, [[l:line, l:col, l:size]])] endfor endif endfunction @@ -130,8 +130,8 @@ function! ale#highlight#BufferHidden(buffer) abort " Remove match_ids, as they must be re-calculated when buffers are " shown again. for l:item in l:loclist - if has_key(l:item, 'match_id') - call remove(l:item, 'match_id') + if has_key(l:item, 'match_id_list') + call remove(l:item, 'match_id_list') endif endfor |