Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After attaching ext_messages, 'cmdheight' is set to zero for current tabpage only #28526

Closed
Sam-programs opened this issue Apr 26, 2024 · 1 comment · Fixed by #28522
Closed
Labels
bug issues reporting wrong behavior ui-extensibility UI extensibility, events, protocol

Comments

@Sam-programs
Copy link
Contributor

Sam-programs commented Apr 26, 2024

Problem

After attaching ext_messages, 'cmdheight' is set to zero for current tabpage only. And When switching to other tabpages, The statusline becomes duplicated (one on the bottom row and one above that).

Ref folke/noice.nvim#775

Steps to reproduce

nvim --clean -u minimal.lua

-- minimal.lua
vim.cmd("tabnew")
vim.ui_attach(vim.api.nvim_create_namespace("a"), { ext_messages = true }, function() end)
vim.schedule(function()
    vim.cmd("tabNext")
end)

Expected behavior

When attaching ext_messages 'cmdheight' is set to 0 in every tab.

Context:
This is the code for setting 'cmdheight'.

neovim/src/nvim/ui.c

Lines 231 to 234 in 6888607

if (i == kUIMessages && !ui_ext[i] && ext_widgets[i]) {
set_option_value(kOptCmdheight, NUMBER_OPTVAL(0), 0);
command_height();
}

neovim/src/nvim/option.c

Lines 174 to 178 in 6888607

void set_init_tablocal(void)
{
// susy baka: cmdheight calls itself OPT_GLOBAL but is really tablocal!
p_ch = options[kOptCmdheight].def_val.number;
}

Neovim version (nvim -v)

current master (https://github.com/neovim/neovim/commits/688860741589b4583129e426f4df0523f9213275))

Vim (not Nvim) behaves the same?

No external ui in vim.

Operating system/version

Linux ArchLinux 6.8.1-arch1-1

Terminal name/version

wezterm 20240203-110809-5046fc22

$TERM environment variable

wezterm

Installation

make on master

@Sam-programs Sam-programs added the bug issues reporting wrong behavior label Apr 26, 2024
@Sam-programs Sam-programs changed the title After attaching ext_messages, 'cmdheight' is only zero on the current tabpage. After attaching ext_messages 'cmdheight' is set to zero only for the current tabpage. Apr 26, 2024
@Sam-programs Sam-programs changed the title After attaching ext_messages 'cmdheight' is set to zero only for the current tabpage. After attaching ext_messages, 'cmdheight' is set to zero for current tabpage only Apr 26, 2024
@justinmk justinmk added the ui-extensibility UI extensibility, events, protocol label Apr 26, 2024
@luukvbaal
Copy link
Contributor

Thanks for the clear repro steps, #28522 should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior ui-extensibility UI extensibility, events, protocol
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants