From 492ac04f7e0ffcc5011d3604b234d149f8b0bb91 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 12 Sep 2019 16:43:52 -0700 Subject: UIEnter/UILeave: fire for embedder UI, builtin TUI Before this, --embed UIs (without --headless) would not trigger UIEnter. For TUI, maybe UIEnter isn't useful, but: - It is less "surprising"/special. - Makes documentation simpler. - When TUI becomes a coprocess, it will happen anyway. --- test/functional/api/ui_spec.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'test/functional/api') diff --git a/test/functional/api/ui_spec.lua b/test/functional/api/ui_spec.lua index c5c3185eff..279cd1856d 100644 --- a/test/functional/api/ui_spec.lua +++ b/test/functional/api/ui_spec.lua @@ -37,12 +37,14 @@ describe('nvim_ui_attach()', function() end) it('autocmds UIEnter/UILeave', function() - clear{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'}, + 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")', + }} local screen = Screen.new() screen:attach() eq({chan=1}, eval('g:uienter_ev')) -- cgit