From 74998b0449c4df0494c3bfe5d4034c575d972406 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 3 Feb 2022 13:43:48 +0800 Subject: fix(event-loop): call vpeekc() directly first to check for character Expand mappings first by calling `vpeekc()` directly. --- test/functional/ui/input_spec.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test/functional/ui/input_spec.lua') diff --git a/test/functional/ui/input_spec.lua b/test/functional/ui/input_spec.lua index 11718a6e18..cf22757b91 100644 --- a/test/functional/ui/input_spec.lua +++ b/test/functional/ui/input_spec.lua @@ -140,6 +140,25 @@ describe('input utf sequences that contain CSI (0x9B)', function() end) end) +describe('input split utf sequences', function() + it('ok', function() + local str = '►' + feed('i' .. str:sub(1, 1)) + helpers.sleep(10) + feed(str:sub(2, 3)) + expect('►') + end) + + it('can be mapped', function() + command('inoremap ► E296BA') + local str = '►' + feed('i' .. str:sub(1, 1)) + helpers.sleep(10) + feed(str:sub(2, 3)) + expect('E296BA') + end) +end) + describe('input non-printable chars', function() after_each(function() os.remove('Xtest-overwrite') -- cgit