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:
Luuk van Baal
2025-04-20 01:09:24 +02:00
committed by luukvbaal
parent de7306a250
commit 7ba0f623d7
6 changed files with 44 additions and 27 deletions

View File

@@ -21,3 +21,4 @@ EXTERN Array noargs INIT(= ARRAY_DICT_INIT);
// vim.ui_attach() namespace of currently executed callback.
EXTERN uint32_t ui_event_ns_id INIT( = 0);
EXTERN MultiQueue *resize_events INIT( = NULL);
EXTERN bool ui_refresh_cmdheight INIT( = true);