diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-04-27 06:37:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-27 06:37:40 -0700 |
commit | 158e3297255cc82b2830e08d2067948cc4a8521f (patch) | |
tree | 774522b0db9f03a9b464a63a2928c46b46b6c7b8 /test/functional/lua/ui_event_spec.lua | |
parent | 499070148d8020e1da21b137a94d0aa31a5b65f4 (diff) | |
parent | b8c1b36061f443f82f34f3d4fe7807fc33edefa6 (diff) | |
download | rneovim-158e3297255cc82b2830e08d2067948cc4a8521f.tar.gz rneovim-158e3297255cc82b2830e08d2067948cc4a8521f.tar.bz2 rneovim-158e3297255cc82b2830e08d2067948cc4a8521f.zip |
Merge #28522 handle ui_attach side effects
Diffstat (limited to 'test/functional/lua/ui_event_spec.lua')
-rw-r--r-- | test/functional/lua/ui_event_spec.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/lua/ui_event_spec.lua b/test/functional/lua/ui_event_spec.lua index 5fe51a2c35..ae39172145 100644 --- a/test/functional/lua/ui_event_spec.lua +++ b/test/functional/lua/ui_event_spec.lua @@ -155,6 +155,21 @@ describe('vim.ui_attach', function() }, }, actual, vim.inspect(actual)) end) + + it('ui_refresh() works without remote UI', function() + screen:detach() + exec_lua('vim.ui_attach(ns, { ext_messages = true }, on_event)') + n.api.nvim_set_option_value('cmdheight', 1, {}) + screen:attach() + eq(1, n.api.nvim_get_option_value('cmdheight', {})) + end) + + it("ui_refresh() sets 'cmdheight' for all open tabpages with ext_messages", function() + exec_lua('vim.cmd.tabnew()') + exec_lua('vim.ui_attach(ns, { ext_messages = true }, on_event)') + exec_lua('vim.cmd.tabnext()') + eq(0, n.api.nvim_get_option_value('cmdheight', {})) + end) end) describe('vim.ui_attach', function() |