Only set background color if it's changing
This commit is contained in:
parent
88f5da156e
commit
2b60626ed3
|
@ -72,10 +72,14 @@ function! UpdateColors()
|
||||||
let dark_mode = substitute(system(cmd), '\n', '', 'g')
|
let dark_mode = substitute(system(cmd), '\n', '', 'g')
|
||||||
" Set colorscheme and background based on mode
|
" Set colorscheme and background based on mode
|
||||||
if dark_mode ==# 'Dark'
|
if dark_mode ==# 'Dark'
|
||||||
set background=dark
|
if &background !=# 'dark'
|
||||||
|
set background=dark
|
||||||
|
endif
|
||||||
call s:maybe_set_color(s:env_color_dark)
|
call s:maybe_set_color(s:env_color_dark)
|
||||||
else
|
else
|
||||||
set background=light
|
if &background !=# 'light'
|
||||||
|
set background=light
|
||||||
|
endif
|
||||||
call s:maybe_set_color(s:env_color_light)
|
call s:maybe_set_color(s:env_color_light)
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
Loading…
Reference in New Issue