mirror of
https://github.com/neovim/neovim.git
synced 2026-04-29 10:44:08 +00:00
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:
@@ -75,6 +75,7 @@ function M.enable(opts)
|
|||||||
-- The visibility and appearance of the cmdline and message box window is
|
-- The visibility and appearance of the cmdline and message box window is
|
||||||
-- dependent on some option values. Reconfigure windows when option value
|
-- dependent on some option values. Reconfigure windows when option value
|
||||||
-- has changed and after VimEnter when the user configured value is known.
|
-- 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)
|
local function check_opt(name, value)
|
||||||
if name == 'cmdheight' then
|
if name == 'cmdheight' then
|
||||||
-- 'cmdheight' set; (un)hide cmdline window and set its height.
|
-- 'cmdheight' set; (un)hide cmdline window and set its height.
|
||||||
@@ -91,6 +92,11 @@ function M.enable(opts)
|
|||||||
end
|
end
|
||||||
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', {
|
api.nvim_create_autocmd('OptionSet', {
|
||||||
group = ext.augroup,
|
group = ext.augroup,
|
||||||
pattern = { 'cmdheight', 'termguicolors' },
|
pattern = { 'cmdheight', 'termguicolors' },
|
||||||
|
|||||||
Reference in New Issue
Block a user