Fix off by one error line highlight w/ nvim api
This commit is contained in:
parent
7f0954b89e
commit
e6ba936a0c
@ -110,7 +110,7 @@ function! s:highlight_line(bufnr, lnum, group) abort
|
|||||||
let l:highlight_id = s:ale_nvim_highlight_id(a:bufnr)
|
let l:highlight_id = s:ale_nvim_highlight_id(a:bufnr)
|
||||||
call ale#highlight#nvim_buf_add_highlight(
|
call ale#highlight#nvim_buf_add_highlight(
|
||||||
\ a:bufnr, l:highlight_id, a:group,
|
\ a:bufnr, l:highlight_id, a:group,
|
||||||
\ a:lnum, 0, -1
|
\ a:lnum - 1, 0, -1
|
||||||
\)
|
\)
|
||||||
else
|
else
|
||||||
call matchaddpos(a:group, [a:lnum])
|
call matchaddpos(a:group, [a:lnum])
|
||||||
|
@ -154,7 +154,7 @@ Execute(Check usage of nvim_buf_add_highlight / line highights):
|
|||||||
\ [bufnr(''), 42, 'ALEError', 2, 0, -1],
|
\ [bufnr(''), 42, 'ALEError', 2, 0, -1],
|
||||||
\ [bufnr(''), 42, 'ALEError', 3, 0, -1],
|
\ [bufnr(''), 42, 'ALEError', 3, 0, -1],
|
||||||
\ [bufnr(''), 42, 'ALEError', 4, 0, 10],
|
\ [bufnr(''), 42, 'ALEError', 4, 0, 10],
|
||||||
\ [bufnr(''), 42, 'ALEErrorLine', 2, 0, -1]
|
\ [bufnr(''), 42, 'ALEErrorLine', 1, 0, -1]
|
||||||
\ ],
|
\ ],
|
||||||
\ g:nvim_buf_add_highlight_calls
|
\ g:nvim_buf_add_highlight_calls
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user