mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Handle existing GitGutter* highlight groups which are links
Fixes #701.
This commit is contained in:
@@ -89,7 +89,12 @@ function! gitgutter#highlight#define_highlights() abort
|
||||
" set their backgrounds to the sign column's.
|
||||
for type in ["Add", "Change", "Delete"]
|
||||
if hlexists("GitGutter".type)
|
||||
execute "highlight GitGutter".type." guibg=".guibg." ctermbg=".ctermbg
|
||||
" Were the highlight self-contained we could just declare the
|
||||
" background attributes and they would be merged. But it might be a
|
||||
" link, in which case it would be overwritten. So re-declare it in its
|
||||
" entirety.
|
||||
let [guifg, ctermfg] = s:get_foreground_colors('GitGutter'.type)
|
||||
execute "highlight GitGutter".type." guifg=".guifg." guibg=".guibg." ctermfg=".ctermfg." ctermbg=".ctermbg
|
||||
endif
|
||||
endfor
|
||||
|
||||
|
||||
Reference in New Issue
Block a user