aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/ui_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-11-01 12:16:37 +0800
committerGitHub <noreply@github.com>2023-11-01 12:16:37 +0800
commitd7359a87425dc38efda4f74bd580bae9946abe31 (patch)
treeb7537f7e65967d844c150e7ba2f3f7a885b1e012 /test/functional/api/ui_spec.lua
parent4e6096a67fe9860994be38bcd155e7c47313205e (diff)
downloadrneovim-d7359a87425dc38efda4f74bd580bae9946abe31.tar.gz
rneovim-d7359a87425dc38efda4f74bd580bae9946abe31.tar.bz2
rneovim-d7359a87425dc38efda4f74bd580bae9946abe31.zip
fix(startup): trigger UIEnter for the correct channel (#25860)
Diffstat (limited to 'test/functional/api/ui_spec.lua')
-rw-r--r--test/functional/api/ui_spec.lua15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/functional/api/ui_spec.lua b/test/functional/api/ui_spec.lua
index 2cadfe117f..a668d47448 100644
--- a/test/functional/api/ui_spec.lua
+++ b/test/functional/api/ui_spec.lua
@@ -60,14 +60,13 @@ describe('nvim_ui_attach()', function()
end)
it('autocmds UIEnter/UILeave', function()
- clear{
- args_rm={'--headless'},
- args={
- '--cmd', 'let g:evs = []',
- '--cmd', 'autocmd UIEnter * :call add(g:evs, "UIEnter") | let g:uienter_ev = deepcopy(v:event)',
- '--cmd', 'autocmd UILeave * :call add(g:evs, "UILeave") | let g:uileave_ev = deepcopy(v:event)',
- '--cmd', 'autocmd VimEnter * :call add(g:evs, "VimEnter")',
- }}
+ clear{args_rm={'--headless'}}
+ exec([[
+ let g:evs = []
+ autocmd UIEnter * call add(g:evs, "UIEnter") | let g:uienter_ev = deepcopy(v:event)
+ autocmd UILeave * call add(g:evs, "UILeave") | let g:uileave_ev = deepcopy(v:event)
+ autocmd VimEnter * call add(g:evs, "VimEnter")
+ ]])
local screen = Screen.new()
screen:attach()
eq({chan=1}, eval('g:uienter_ev'))