neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 5a08b5be3c34595487f7a22475e4434721f2320f
parent 68da87d2e78432151a237cf0dc47b32846c24f3c
Author: Null Chilly <56817415+nullchilly@users.noreply.github.com>
Date:   Fri, 26 May 2023 16:51:02 +0700

fix(tui): don't set tty background if &bg was set before VimEnter (#23701)


Diffstat:
Msrc/nvim/option.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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");