Fix #2835 - Bump up the sign group version check for NeoVim

This commit is contained in:
w0rp
2019-10-21 09:35:23 +01:00
parent c06467438d
commit 67d0ccc398
4 changed files with 17 additions and 15 deletions

View File

@@ -23,6 +23,8 @@ let g:ale_sign_offset = get(g:, 'ale_sign_offset', 1000000)
let g:ale_sign_column_always = get(g:, 'ale_sign_column_always', 0)
let g:ale_sign_highlight_linenrs = get(g:, 'ale_sign_highlight_linenrs', 0)
let s:supports_sign_groups = has('nvim-0.4.2') || (v:version >= 801 && has('patch614'))
if !hlexists('ALEErrorSign')
highlight link ALEErrorSign error
endif
@@ -149,7 +151,7 @@ function! ale#sign#GetSignName(sublist) abort
endfunction
function! s:PriorityCmd() abort
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
if s:supports_sign_groups
return ' priority=' . g:ale_sign_priority . ' '
else
return ''
@@ -157,7 +159,7 @@ function! s:PriorityCmd() abort
endfunction
function! s:GroupCmd() abort
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
if s:supports_sign_groups
return ' group=ale '
else
return ' '
@@ -175,7 +177,7 @@ function! ale#sign#ReadSigns(buffer) abort
endfunction
function! ale#sign#ParsePattern() abort
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
if s:supports_sign_groups
" Matches output like :
" line=4 id=1 group=ale name=ALEErrorSign
" строка=1 id=1000001 группа=ale имя=ALEErrorSign
@@ -460,7 +462,7 @@ endfunction
" Remove all signs.
function! ale#sign#Clear() abort
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
if s:supports_sign_groups
sign unplace group=ale *
else
sign unplace *