mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
fix(terminal): avoid reading over the end of cell.chars (#19580)
This commit is contained in:
@@ -5,6 +5,8 @@ local feed, clear, nvim = helpers.feed, helpers.clear, helpers.nvim
|
||||
local poke_eventloop = helpers.poke_eventloop
|
||||
local eval, feed_command, source = helpers.eval, helpers.feed_command, helpers.source
|
||||
local eq, neq = helpers.eq, helpers.neq
|
||||
local meths = helpers.meths
|
||||
local retry = helpers.retry
|
||||
local write_file = helpers.write_file
|
||||
local command = helpers.command
|
||||
local exc_exec = helpers.exc_exec
|
||||
@@ -364,3 +366,11 @@ describe('on_lines does not emit out-of-bounds line indexes when', function()
|
||||
eq('', exec_lua([[return _G.cb_error]]))
|
||||
end)
|
||||
end)
|
||||
|
||||
it('terminal truncates number of composing characters to 5', function()
|
||||
clear()
|
||||
local chan = meths.open_term(0, {})
|
||||
local composing = ('a̳'):sub(2)
|
||||
meths.chan_send(chan, 'a' .. composing:rep(8))
|
||||
retry(nil, nil, function() eq('a' .. composing:rep(5), meths.get_current_line()) end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user