aboutsummaryrefslogtreecommitdiff
path: root/test/functional/editor/mode_normal_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-11-25 19:15:05 +0000
committerJosh Rahm <joshuarahm@gmail.com>2024-11-25 19:27:38 +0000
commitc5d770d311841ea5230426cc4c868e8db27300a8 (patch)
treedd21f70127b4b8b5f109baefc8ecc5016f507c91 /test/functional/editor/mode_normal_spec.lua
parent9be89f131f87608f224f0ee06d199fcd09d32176 (diff)
parent081beb3659bd6d8efc3e977a160b1e72becbd8a2 (diff)
downloadrneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.gz
rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.bz2
rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'test/functional/editor/mode_normal_spec.lua')
-rw-r--r--test/functional/editor/mode_normal_spec.lua20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/functional/editor/mode_normal_spec.lua b/test/functional/editor/mode_normal_spec.lua
index b3ef4866dc..5237f51237 100644
--- a/test/functional/editor/mode_normal_spec.lua
+++ b/test/functional/editor/mode_normal_spec.lua
@@ -9,6 +9,7 @@ local feed = n.feed
local fn = n.fn
local command = n.command
local eq = t.eq
+local api = n.api
describe('Normal mode', function()
before_each(clear)
@@ -25,7 +26,6 @@ describe('Normal mode', function()
it('&showcmd does not crash with :startinsert #28419', function()
local screen = Screen.new(60, 17)
- screen:attach()
fn.termopen(
{ n.nvim_prog, '--clean', '--cmd', 'startinsert' },
{ env = { VIMRUNTIME = os.getenv('VIMRUNTIME') } }
@@ -41,4 +41,22 @@ describe('Normal mode', function()
attr_ids = {},
})
end)
+
+ it('replacing with ZWJ emoji sequences', function()
+ local screen = Screen.new(30, 8)
+ api.nvim_buf_set_lines(0, 0, -1, true, { 'abcdefg' })
+ feed('05rπŸ§‘β€πŸŒΎ') -- ZWJ
+ screen:expect([[
+ πŸ§‘β€πŸŒΎπŸ§‘β€πŸŒΎπŸ§‘β€πŸŒΎπŸ§‘β€πŸŒΎ^πŸ§‘β€πŸŒΎfg |
+ {1:~ }|*6
+ |
+ ]])
+
+ feed('2rπŸ³οΈβ€βš§οΈ') -- ZWJ and variant selectors
+ screen:expect([[
+ πŸ§‘β€πŸŒΎπŸ§‘β€πŸŒΎπŸ§‘β€πŸŒΎπŸ§‘β€πŸŒΎπŸ³οΈβ€βš§οΈ^πŸ³οΈβ€βš§οΈg |
+ {1:~ }|*6
+ |
+ ]])
+ end)
end)