diff options
author | Gregory Anders <greg@gpanders.com> | 2023-11-06 15:46:44 -0600 |
---|---|---|
committer | Gregory Anders <greg@gpanders.com> | 2023-11-13 19:04:46 -0600 |
commit | ab102f188e86bdbfce1d4de2ef633092a906e8fe (patch) | |
tree | f2386727d6e7c8114565cc4e7d22ec484e8a876b /src/nvim/option.c | |
parent | 48bcc7b9710d6db619b05254ea87f4087cdd9764 (diff) | |
download | rneovim-ab102f188e86bdbfce1d4de2ef633092a906e8fe.tar.gz rneovim-ab102f188e86bdbfce1d4de2ef633092a906e8fe.tar.bz2 rneovim-ab102f188e86bdbfce1d4de2ef633092a906e8fe.zip |
refactor: move background color detection into Lua
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 23d5960579..d3a8e2ce73 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3183,23 +3183,6 @@ bool set_tty_option(const char *name, char *value) return false; } -void set_tty_background(const char *value) -{ - if (option_was_set("bg") || strequal(p_bg, value)) { - // background is already set... ignore - return; - } - if (starting) { - // Wait until after startup, so OptionSet is triggered. - do_cmdline_cmd((value[0] == 'l') - ? "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", CSTR_AS_OPTVAL((char *)value), 0); - reset_option_was_set("bg"); - } -} - /// Find index for an option /// /// @param[in] arg Option name. |