mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Do not set background on existing GitGutter* highlights unless requested
If GitGutter* highlight groups already exist, they were declared
deliberately (either by the colorscheme maintainer or the user). So do
not adjust them.
However if you would like to make the signs' backgrounds match the sign
column, you can do this:
let g:gitgutter_set_sign_backgrounds = 1
This commit is contained in:
@@ -76,11 +76,12 @@ function! gitgutter#highlight#define_highlights() abort
|
||||
highlight default link GitGutterChangeDeleteInvisible GitGutterChangeInvisible
|
||||
|
||||
" When they are visible.
|
||||
|
||||
" The background colours are set to the sign column's.
|
||||
for type in ["Add", "Change", "Delete"]
|
||||
if hlexists("GitGutter".type)
|
||||
let [guifg, ctermfg] = s:get_foreground_colors('GitGutter'.type)
|
||||
if g:gitgutter_set_sign_backgrounds
|
||||
execute "highlight GitGutter".type." guibg=".guibg." ctermbg=".ctermbg
|
||||
endif
|
||||
continue
|
||||
elseif s:useful_diff_colours()
|
||||
let [guifg, ctermfg] = s:get_foreground_colors('Diff'.type)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user