mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
fix(tui): don't set tty background if &bg was set before VimEnter (#23701)
This commit is contained in:
parent
68da87d2e7
commit
5a08b5be3c
@ -3336,8 +3336,8 @@ void set_tty_background(const char *value)
|
||||
if (starting) {
|
||||
// Wait until after startup, so OptionSet is triggered.
|
||||
do_cmdline_cmd((value[0] == 'l')
|
||||
? "autocmd VimEnter * ++once ++nested set bg=light"
|
||||
: "autocmd VimEnter * ++once ++nested set bg=dark");
|
||||
? "autocmd VimEnter * ++once ++nested :lua if not vim.api.nvim_get_option_info2('bg', {}).was_set then vim.o.bg = 'light' end"
|
||||
: "autocmd VimEnter * ++once ++nested :lua if not vim.api.nvim_get_option_info2('bg', {}).was_set then vim.o.bg = 'dark' end");
|
||||
} else {
|
||||
set_option_value_give_err("bg", 0L, value, 0);
|
||||
reset_option_was_set("bg");
|
||||
|
Loading…
Reference in New Issue
Block a user