aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/timer_spec.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-02-06 19:22:02 +0100
committerGitHub <noreply@github.com>2022-02-06 19:22:02 +0100
commitf0699f43566cd3e5f7fbc4d1e2802c610b5bfa5c (patch)
tree4a418cd1bbd545e1a106fb122ea2d8c050da2fbe /test/functional/vimscript/timer_spec.lua
parentc7df847c07c3b3cc6c47e3f33be9b66eb69ce448 (diff)
parent74998b0449c4df0494c3bfe5d4034c575d972406 (diff)
downloadrneovim-f0699f43566cd3e5f7fbc4d1e2802c610b5bfa5c.tar.gz
rneovim-f0699f43566cd3e5f7fbc4d1e2802c610b5bfa5c.tar.bz2
rneovim-f0699f43566cd3e5f7fbc4d1e2802c610b5bfa5c.zip
Merge pull request #17279 from zeertzjq/state-enter-vpeekc
fix(event-loop): call vpeekc() directly first to check for character
Diffstat (limited to 'test/functional/vimscript/timer_spec.lua')
-rw-r--r--test/functional/vimscript/timer_spec.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/vimscript/timer_spec.lua b/test/functional/vimscript/timer_spec.lua
index e45b64422f..25e46062b7 100644
--- a/test/functional/vimscript/timer_spec.lua
+++ b/test/functional/vimscript/timer_spec.lua
@@ -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)