Skip to content

Commit

Permalink
Only set the background after entering vim
Browse files Browse the repository at this point in the history
This allows vim to guess the value of &background. This will set the
best colors based on system configuration. This will especially help
while using 16 colors: see #50

This disables the fix for morhetz#7 temporarily while entering
vim. It should still be possible to switch to and from light and dark
mode afterwards.
  • Loading branch information
rbong committed Jun 2, 2019
1 parent a70cb07 commit 53e78de
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions colors/gruvbox.vim
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,12 @@ call s:HL('Normal', s:fg1, s:bg0)
" Correct background (see issue #7):
" --- Problem with changing between dark and light on 256 color terminal
" --- https://github.com/morhetz/gruvbox/issues/7
if s:is_dark
set background=dark
else
set background=light
if v:vim_did_enter
if s:is_dark
set background=dark
else
set background=light
endif
endif

if version >= 700
Expand Down

0 comments on commit 53e78de

Please sign in to comment.