fix(process): don't limit PTY master remaining data size

This commit is contained in:
zeertzjq
2026-01-15 09:29:51 +08:00
parent 75c8f75501
commit e051718908
3 changed files with 45 additions and 16 deletions

View File

@@ -758,6 +758,25 @@ describe(':terminal buffer', function()
]])
end)
it('does not drop data when job exits immediately after output #3030', function()
local screen = Screen.new(50, 7)
api.nvim_create_autocmd('TermClose', { command = 'let g:did_termclose = 1' })
fn.jobstart({ testprg('shell-test'), 'REPFAST', '20000', 'TEST' }, { term = true })
retry(nil, nil, function()
eq(1, api.nvim_get_var('did_termclose'))
end)
feed('i')
screen:expect([[
19996: TEST |
19997: TEST |
19998: TEST |
19999: TEST |
|
[Process exited 0]^ |
{5:-- TERMINAL --} |
]])
end)
it('handles unprintable chars', function()
local screen = Screen.new(50, 7)
feed 'i'