diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-03-19 16:56:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-19 16:56:51 +0800 |
commit | 16a416cb3c17ed3a7f21d35da5d211fcad947768 (patch) | |
tree | 55372aaea468fb1289fdfbc38a7eb780af7fbb12 /test/functional/terminal/buffer_spec.lua | |
parent | c30ebb17f6b98625e3db8f032c2223876bb60f99 (diff) | |
download | rneovim-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.lua | 15 |
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() |