refactor: only reload colorscheme if &bg changed (#26598)

Currently, setting &bg at all re-initializes highlights and reloads
the active colorscheme, even if the actual value of &bg has not changed.
With https://github.com/neovim/neovim/pull/26595 this causes a
regression since &bg is set unconditionally based on the value detected
from the terminal.

Instead, only reload the colorscheme if the actual value of &bg has
changed.
This commit is contained in:
Gregory Anders
2023-12-16 11:18:45 -06:00
committed by GitHub
parent 7840760776
commit 8fb7419d7c
5 changed files with 14 additions and 19 deletions

View File

@@ -299,6 +299,8 @@ Options:
global-local string options work.
'autoread' works in the terminal (if it supports "focus" events)
'background' colorscheme is only reloaded if value is changed, not every
time it is set
'cpoptions' flags: |cpo-_|
'diffopt' "linematch" feature
'exrc' searches for ".nvim.lua", ".nvimrc", or ".exrc" files. The