aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-11-04 14:07:10 +0100
committerbfredl <bjorn.linse@gmail.com>2024-11-08 11:25:34 +0100
commit092042b43d58254807c9e1151d8b6efb4d6410c4 (patch)
treeef61ba6ec0433a6c03128b2ff4f72c5eaa191385 /test
parent8ab1903092f0ab193adf17ee635da838cce01dfa (diff)
downloadrneovim-092042b43d58254807c9e1151d8b6efb4d6410c4.tar.gz
rneovim-092042b43d58254807c9e1151d8b6efb4d6410c4.tar.bz2
rneovim-092042b43d58254807c9e1151d8b6efb4d6410c4.zip
fix(cmdline): simplify and correct grapheme cluster adjustment
Diffstat (limited to 'test')
-rw-r--r--test/functional/editor/mode_cmdline_spec.lua21
1 files changed, 21 insertions, 0 deletions
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([[:<C-R>="foo\nbar\rbaz"<CR>]])
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('<c-r><c-r>a')
+ screen:expect([[
+ |
+ {1:~ }|*2
+ :test 🧑‍💻^ |
+ ]])
+ end)
end)
it('Ctrl-Shift-V supports entering unsimplified key notations', function()