fix(extui): check option values after VimEnter (#33768)

Problem:  Not picking up configured option values when enabling _extui after startup.
Solution:  Check option values when enabing _extui.

Fix https://github.com/neovim/neovim/issues/33767
This commit is contained in:
luukvbaal
2025-05-02 13:13:12 +02:00
committed by GitHub
parent 4b5364b423
commit 3c7c824bdc

View File

@@ -75,6 +75,7 @@ function M.enable(opts)
-- The visibility and appearance of the cmdline and message box window is
-- dependent on some option values. Reconfigure windows when option value
-- has changed and after VimEnter when the user configured value is known.
-- TODO: Reconsider what is needed when this module is enabled by default early in startup.
local function check_opt(name, value)
if name == 'cmdheight' then
-- 'cmdheight' set; (un)hide cmdline window and set its height.
@@ -91,6 +92,11 @@ function M.enable(opts)
end
end
if vim.v.vim_did_enter == 1 then
check_opt('cmdheight', vim.o.cmdheight)
check_opt('termguicolors', vim.o.termguicolors)
end
api.nvim_create_autocmd('OptionSet', {
group = ext.augroup,
pattern = { 'cmdheight', 'termguicolors' },