From 092042b43d58254807c9e1151d8b6efb4d6410c4 Mon Sep 17 00:00:00 2001 From: bfredl Date: Mon, 4 Nov 2024 14:07:10 +0100 Subject: fix(cmdline): simplify and correct grapheme cluster adjustment --- test/functional/editor/mode_cmdline_spec.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'test') diff --git a/test/functional/editor/mode_cmdline_spec.lua b/test/functional/editor/mode_cmdline_spec.lua index efd7a37c0b..bb74dfe12f 100644 --- a/test/functional/editor/mode_cmdline_spec.lua +++ b/test/functional/editor/mode_cmdline_spec.lua @@ -38,6 +38,27 @@ describe('cmdline', function() feed([[:="foo\nbar\rbaz"]]) eq('foo\nbar\rbaz', fn.getcmdline()) end) + + it('pasting handles composing chars properly', function() + local screen = Screen.new(60, 4) + -- 'arabicshape' cheats and always redraws everything which trivially works, + -- this test is for partial redraws in 'noarabicshape' mode. + command('set noarabicshape') + screen:attach() + fn.setreg('a', '💻') + feed(':test 🧑‍') + screen:expect([[ + | + {1:~ }|*2 + :test 🧑‍^ | + ]]) + feed('a') + screen:expect([[ + | + {1:~ }|*2 + :test 🧑‍💻^ | + ]]) + end) end) it('Ctrl-Shift-V supports entering unsimplified key notations', function() -- cgit