diff options
-rw-r--r-- | src/nvim/option.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 722afa64d8..bc24a73e82 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -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"); |