mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
feat(ui): avoid setting 'cmdheight' with vim.ui_attach()
Problem: We allow setting 'cmdheight' to 0 with ext_messages enabled
since b72931e7
. Enabling ext_messages with vim.ui_attach()
implicitly sets 'cmdheight' to 0 for BWC. When non-zero
'cmdheight' is wanted, this behavior make it unnecessarily
hard to keep track of the user configured value.
Solution: Add set_cmdheight to vim.ui_attach() opts table that can be
set to false to avoid setting 'cmdheight' to 0.
This commit is contained in:
@@ -223,9 +223,11 @@ void ui_refresh(void)
|
||||
|
||||
// Reset 'cmdheight' for all tabpages when ext_messages toggles.
|
||||
if (had_message != ui_ext[kUIMessages]) {
|
||||
set_option_value(kOptCmdheight, NUMBER_OPTVAL(had_message), 0);
|
||||
FOR_ALL_TABS(tp) {
|
||||
tp->tp_ch_used = had_message;
|
||||
if (ui_refresh_cmdheight) {
|
||||
set_option_value(kOptCmdheight, NUMBER_OPTVAL(had_message), 0);
|
||||
FOR_ALL_TABS(tp) {
|
||||
tp->tp_ch_used = had_message;
|
||||
}
|
||||
}
|
||||
msg_scroll_flush();
|
||||
}
|
||||
|
Reference in New Issue
Block a user