aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/ui_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-12 16:08:22 -0700
committerJustin M. Keyes <justinkz@gmail.com>2019-09-12 17:04:05 -0700
commit589f612adfea22b688618fa90e011f5494ca5204 (patch)
tree05d55149f75fc76e5045ccccabf242e1955ca5fd /test/functional/api/ui_spec.lua
parent44d45e29ea4a632e66ac63d25d355a5a4c7178bc (diff)
downloadrneovim-589f612adfea22b688618fa90e011f5494ca5204.tar.gz
rneovim-589f612adfea22b688618fa90e011f5494ca5204.tar.bz2
rneovim-589f612adfea22b688618fa90e011f5494ca5204.zip
rename: UIAttach/UIDetach => UIEnter/UILeave
"enter"/"leave" is more conventional for Vim events, and "attach"/"detach" distinction does not gain much.
Diffstat (limited to 'test/functional/api/ui_spec.lua')
-rw-r--r--test/functional/api/ui_spec.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/api/ui_spec.lua b/test/functional/api/ui_spec.lua
index f874fe44a5..c5c3185eff 100644
--- a/test/functional/api/ui_spec.lua
+++ b/test/functional/api/ui_spec.lua
@@ -36,21 +36,21 @@ describe('nvim_ui_attach()', function()
end)
end)
-it('autocmds UIAttach/UIDetach', function()
+it('autocmds UIEnter/UILeave', function()
clear{args={
'--cmd', 'let g:evs = []',
- '--cmd', 'autocmd UIAttach * :call add(g:evs, "UIAttach") | let g:ui_attach_ev = deepcopy(v:event)',
- '--cmd', 'autocmd UIDetach * :call add(g:evs, "UIDetach") | let g:ui_detach_ev = deepcopy(v:event)',
+ '--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:ui_attach_ev'))
+ eq({chan=1}, eval('g:uienter_ev'))
screen:detach()
- eq({chan=1}, eval('g:ui_detach_ev'))
+ eq({chan=1}, eval('g:uileave_ev'))
eq({
'VimEnter',
- 'UIAttach',
- 'UIDetach',
+ 'UIEnter',
+ 'UILeave',
}, eval('g:evs'))
end)