diff options
author | w0rp <devw0rp@gmail.com> | 2017-05-16 18:12:49 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-05-16 18:12:49 +0100 |
commit | a65358cfce6f2748918ef822c69a8f56eec83f20 (patch) | |
tree | 1284790d8d10a38882e359df93a1705aecae846b /autoload | |
parent | 8712aee5dcddd366ae52a0c57e67fdbc13c030ee (diff) | |
download | ale-a65358cfce6f2748918ef822c69a8f56eec83f20.zip |
#538 Suport highlight sizes by looking at end column numbers
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/engine.vim | 5 | ||||
-rw-r--r-- | autoload/ale/highlight.vim | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/autoload/ale/engine.vim b/autoload/ale/engine.vim index c778f253..49cc2a9a 100644 --- a/autoload/ale/engine.vim +++ b/autoload/ale/engine.vim @@ -288,6 +288,11 @@ function! ale#engine#FixLocList(buffer, linter, loclist) abort let l:item.detail = l:old_item.detail endif + " Pass on a col_length key if set, used for highlights. + if has_key(l:old_item, 'end_col') + let l:item.end_col = str2nr(l:old_item.end_col) + endif + if l:item.lnum == 0 " When errors appear at line 0, put them at line 1 instead. let l:item.lnum = 1 diff --git a/autoload/ale/highlight.vim b/autoload/ale/highlight.vim index f3a479e3..b51e5b2d 100644 --- a/autoload/ale/highlight.vim +++ b/autoload/ale/highlight.vim @@ -86,7 +86,7 @@ function! ale#highlight#UpdateHighlights() abort let l:col = l:item.col let l:group = l:item.type ==# 'E' ? 'ALEError' : 'ALEWarning' let l:line = l:item.lnum - let l:size = 1 + let l:size = has_key(l:item, 'end_col') ? l:item.end_col - l:col : 1 " Rememeber the match ID for the item. " This ID will be used to preserve loclist items which are set |