aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/buffer_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-19 16:56:51 +0800
committerGitHub <noreply@github.com>2024-03-19 16:56:51 +0800
commit16a416cb3c17ed3a7f21d35da5d211fcad947768 (patch)
tree55372aaea468fb1289fdfbc38a7eb780af7fbb12 /test/functional/terminal/buffer_spec.lua
parentc30ebb17f6b98625e3db8f032c2223876bb60f99 (diff)
downloadrneovim-16a416cb3c17ed3a7f21d35da5d211fcad947768.tar.gz
rneovim-16a416cb3c17ed3a7f21d35da5d211fcad947768.tar.bz2
rneovim-16a416cb3c17ed3a7f21d35da5d211fcad947768.zip
fix(terminal): don't pass incomplete UTF-8 sequence to libvterm (#27922)
Diffstat (limited to 'test/functional/terminal/buffer_spec.lua')
-rw-r--r--test/functional/terminal/buffer_spec.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua
index 0c6f74e583..741aaf2fe0 100644
--- a/test/functional/terminal/buffer_spec.lua
+++ b/test/functional/terminal/buffer_spec.lua
@@ -10,6 +10,7 @@ local pcall_err = helpers.pcall_err
local eq, neq = helpers.eq, helpers.neq
local api = helpers.api
local retry = helpers.retry
+local testprg = helpers.testprg
local write_file = helpers.write_file
local command = helpers.command
local exc_exec = helpers.exc_exec
@@ -395,6 +396,20 @@ describe(':terminal buffer', function()
eq('a' .. composing:rep(5), api.nvim_get_current_line())
end)
end)
+
+ it('handles split UTF-8 sequences #16245', function()
+ local screen = Screen.new(50, 7)
+ screen:attach()
+ fn.termopen({ testprg('shell-test'), 'UTF-8' })
+ screen:expect([[
+ ^å |
+ ref: å̲ |
+ 1: å̲ |
+ 2: å̲ |
+ 3: å̲ |
+ |*2
+ ]])
+ end)
end)
describe('on_lines does not emit out-of-bounds line indexes when', function()