mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
fix(event-loop): call vpeekc() directly first to check for character
Expand mappings first by calling `vpeekc()` directly.
This commit is contained in:
@@ -272,4 +272,12 @@ describe('timers', function()
|
||||
]]
|
||||
eq("Vim(call):E48: Not allowed in sandbox", exc_exec("sandbox call timer_start(0, 'Scary')"))
|
||||
end)
|
||||
|
||||
it('can be triggered after an empty string <expr> mapping', function()
|
||||
local screen = Screen.new(40, 6)
|
||||
screen:attach()
|
||||
command([=[imap <expr> <F2> [timer_start(0, { _ -> execute("throw 'x'", "") }), ''][-1]]=])
|
||||
feed('i<F2>')
|
||||
screen:expect({any='E605: Exception not caught: x'})
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user