diff options
author | luukvbaal <luukvbaal@gmail.com> | 2024-04-29 02:51:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-28 17:51:33 -0700 |
commit | ab1c2220f0c7f63e2081eb22544fed9fc4b4c611 (patch) | |
tree | c2e87537b392db213c70f3837ebf104d86d9051d | |
parent | 05be00a2d172b390a2c49828eb8933492cc8345a (diff) | |
download | rneovim-ab1c2220f0c7f63e2081eb22544fed9fc4b4c611.tar.gz rneovim-ab1c2220f0c7f63e2081eb22544fed9fc4b4c611.tar.bz2 rneovim-ab1c2220f0c7f63e2081eb22544fed9fc4b4c611.zip |
fix(ui): activating all ext capabilities without remote UI #28555
-rw-r--r-- | src/nvim/ui.c | 2 | ||||
-rw-r--r-- | test/functional/lua/ui_event_spec.lua | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c index 27458d588b..f5bab309d8 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -198,7 +198,7 @@ void ui_refresh(void) int height = INT_MAX; bool ext_widgets[kUIExtCount]; for (UIExtension i = 0; (int)i < kUIExtCount; i++) { - ext_widgets[i] = true; + ext_widgets[i] = ui_active(); } bool inclusive = ui_override(); diff --git a/test/functional/lua/ui_event_spec.lua b/test/functional/lua/ui_event_spec.lua index ae39172145..4ac0268c4b 100644 --- a/test/functional/lua/ui_event_spec.lua +++ b/test/functional/lua/ui_event_spec.lua @@ -156,8 +156,11 @@ describe('vim.ui_attach', function() }, actual, vim.inspect(actual)) end) - it('ui_refresh() works without remote UI', function() + it('ui_refresh() activates correct capabilities without remote UI', function() screen:detach() + exec_lua('vim.ui_attach(ns, { ext_cmdline = true }, on_event)') + eq(1, n.api.nvim_get_option_value('cmdheight', {})) + exec_lua('vim.ui_detach(ns)') exec_lua('vim.ui_attach(ns, { ext_messages = true }, on_event)') n.api.nvim_set_option_value('cmdheight', 1, {}) screen:attach() |