mirror of
https://github.com/neovim/neovim.git
synced 2025-11-14 06:18:50 +00:00
fix(events): trigger VimResume on next UI request
(cherry picked from commit cdd076d6c1)
This commit is contained in:
committed by
github-actions[bot]
parent
d82f386201
commit
e8ff921ed3
@@ -4,7 +4,6 @@ local spawn, set_session, clear = helpers.spawn, helpers.set_session, helpers.cl
|
||||
local feed, command = helpers.feed, helpers.command
|
||||
local insert = helpers.insert
|
||||
local eq = helpers.eq
|
||||
local eval = helpers.eval
|
||||
local funcs, meths = helpers.funcs, helpers.meths
|
||||
|
||||
describe('screen', function()
|
||||
@@ -64,34 +63,6 @@ local function screen_tests(linegrid)
|
||||
} )
|
||||
end)
|
||||
|
||||
describe(':suspend', function()
|
||||
it('is forwarded to the UI', function()
|
||||
local function check()
|
||||
eq(true, screen.suspended)
|
||||
end
|
||||
|
||||
command('let g:ev = []')
|
||||
command('autocmd VimResume * :call add(g:ev, "r")')
|
||||
command('autocmd VimSuspend * :call add(g:ev, "s")')
|
||||
|
||||
eq(false, screen.suspended)
|
||||
command('suspend')
|
||||
eq({ 's', 'r' }, eval('g:ev'))
|
||||
|
||||
screen:expect(check)
|
||||
screen.suspended = false
|
||||
|
||||
feed('<c-z>')
|
||||
eq({ 's', 'r', 's', 'r' }, eval('g:ev'))
|
||||
|
||||
screen:expect(check)
|
||||
screen.suspended = false
|
||||
|
||||
command('suspend')
|
||||
eq({ 's', 'r', 's', 'r', 's', 'r' }, eval('g:ev'))
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('bell/visual bell', function()
|
||||
it('is forwarded to the UI', function()
|
||||
feed('<left>')
|
||||
|
||||
Reference in New Issue
Block a user