diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2024-04-26 16:21:56 +0200 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2024-04-26 16:42:08 +0200 |
commit | 7626f431d84fc3a6eb82d0d23d436e3e31e991ce (patch) | |
tree | 3ef752fc6552e24f4e430b350342703ada1d76d7 /test/functional/lua/ui_event_spec.lua | |
parent | d855c7a2fb3315f4fb05becff798e42833792fe5 (diff) | |
download | rneovim-7626f431d84fc3a6eb82d0d23d436e3e31e991ce.tar.gz rneovim-7626f431d84fc3a6eb82d0d23d436e3e31e991ce.tar.bz2 rneovim-7626f431d84fc3a6eb82d0d23d436e3e31e991ce.zip |
fix(ui): update ext_ui widgets when attaching non-remote UI
Problem: Updating internalized UI capabilities is postponed until a
remote UI attaches.
Solution: Always update active UI widgets in ui_refresh().
Diffstat (limited to 'test/functional/lua/ui_event_spec.lua')
-rw-r--r-- | test/functional/lua/ui_event_spec.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/lua/ui_event_spec.lua b/test/functional/lua/ui_event_spec.lua index 5fe51a2c35..60f8706e2d 100644 --- a/test/functional/lua/ui_event_spec.lua +++ b/test/functional/lua/ui_event_spec.lua @@ -155,6 +155,14 @@ 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) end) describe('vim.ui_attach', function() |