diff options
| author | luukvbaal <luukvbaal@gmail.com> | 2025-05-02 13:13:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-02 13:13:12 +0200 |
| commit | 3c7c824bdc08052239285b0028885fb610d36d41 (patch) | |
| tree | 64df532f0c0ef706b444f92d07e66a6ff1b401ce /runtime/lua/vim/_extui.lua | |
| parent | 4b5364b4231815ca1ba750068a68816e539d318f (diff) | |
| download | rneovim-3c7c824bdc08052239285b0028885fb610d36d41.tar.gz rneovim-3c7c824bdc08052239285b0028885fb610d36d41.tar.bz2 rneovim-3c7c824bdc08052239285b0028885fb610d36d41.zip | |
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
Diffstat (limited to 'runtime/lua/vim/_extui.lua')
| -rw-r--r-- | runtime/lua/vim/_extui.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/lua/vim/_extui.lua b/runtime/lua/vim/_extui.lua index 8f8ebfcd2b..d6d56de186 100644 --- a/runtime/lua/vim/_extui.lua +++ b/runtime/lua/vim/_extui.lua @@ -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' }, |