mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 20:13:46 -05:00
Fix #639: Use more careful way to enable numhl
The development versions of v0.3.2 also report `has('nvim-0.3.2')` to be
true even if they do not support the `numhl` feature. So here it catches
and ignores the possible errors.
This commit is contained in:
@@ -172,6 +172,7 @@ endfunction
|
||||
|
||||
function! s:define_sign_linenr_highlights() abort
|
||||
if has('nvim-0.3.2')
|
||||
try
|
||||
if g:gitgutter_highlight_linenrs
|
||||
sign define GitGutterLineAdded numhl=GitGutterAddLineNr
|
||||
sign define GitGutterLineModified numhl=GitGutterChangeLineNr
|
||||
@@ -187,6 +188,8 @@ function! s:define_sign_linenr_highlights() abort
|
||||
sign define GitGutterLineRemovedAboveAndBelow numhl=
|
||||
sign define GitGutterLineModifiedRemoved numhl=
|
||||
endif
|
||||
catch /E475/
|
||||
endtry
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user