diff options
author | w0rp <w0rp@users.noreply.github.com> | 2019-05-07 10:47:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-07 10:47:20 +0100 |
commit | 548ee56f401bf3dea7689b0b00c8fbecd2db48b1 (patch) | |
tree | 5f4828159efe5e875633415adb1910da93b2e68f | |
parent | 7f0954b89ef7c43e5fb7b6490665e9814c8205b2 (diff) | |
parent | e6ba936a0c27a741fae55a8bfff4f3ea1da17396 (diff) | |
download | ale-548ee56f401bf3dea7689b0b00c8fbecd2db48b1.zip |
Merge pull request #2475 from andreypopp/andreypopp/fix-nvim-hl
Fix off by one error line highlight w/ nvim api
-rw-r--r-- | autoload/ale/highlight.vim | 2 | ||||
-rw-r--r-- | test/test_nvim_api_highlight.vader | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/autoload/ale/highlight.vim b/autoload/ale/highlight.vim index 3e09f26d..172f9d54 100644 --- a/autoload/ale/highlight.vim +++ b/autoload/ale/highlight.vim @@ -110,7 +110,7 @@ function! s:highlight_line(bufnr, lnum, group) abort let l:highlight_id = s:ale_nvim_highlight_id(a:bufnr) call ale#highlight#nvim_buf_add_highlight( \ a:bufnr, l:highlight_id, a:group, - \ a:lnum, 0, -1 + \ a:lnum - 1, 0, -1 \) else call matchaddpos(a:group, [a:lnum]) diff --git a/test/test_nvim_api_highlight.vader b/test/test_nvim_api_highlight.vader index fd535914..829c3ad7 100644 --- a/test/test_nvim_api_highlight.vader +++ b/test/test_nvim_api_highlight.vader @@ -154,7 +154,7 @@ Execute(Check usage of nvim_buf_add_highlight / line highights): \ [bufnr(''), 42, 'ALEError', 2, 0, -1], \ [bufnr(''), 42, 'ALEError', 3, 0, -1], \ [bufnr(''), 42, 'ALEError', 4, 0, 10], - \ [bufnr(''), 42, 'ALEErrorLine', 2, 0, -1] + \ [bufnr(''), 42, 'ALEErrorLine', 1, 0, -1] \ ], \ g:nvim_buf_add_highlight_calls endif |