feat(term): increase max scrollback to 1000000

Problem:
Cannot use `nvim_open_term()` to pipe terminal scrollback > 100000

Solution:
Increase scrollback limit to 1000000

If there's no technical consequences of doing this, can be set even
higher in the future.
This commit is contained in:
Lewis Russell
2025-07-11 10:43:05 +01:00
committed by Lewis Russell
parent 12276832ab
commit a945686444
6 changed files with 9 additions and 8 deletions

View File

@ -517,8 +517,8 @@ describe("'scrollback' option", function()
it('error if set to invalid value', function()
eq('Vim(set):E474: Invalid argument: scrollback=-2', pcall_err(command, 'set scrollback=-2'))
eq(
'Vim(set):E474: Invalid argument: scrollback=100001',
pcall_err(command, 'set scrollback=100001')
'Vim(set):E474: Invalid argument: scrollback=1000001',
pcall_err(command, 'set scrollback=1000001')
)
end)
@ -538,14 +538,14 @@ describe("'scrollback' option", function()
-- _Local_ scrollback=-1 in :terminal forces the _maximum_.
command('setlocal scrollback=-1')
retry(nil, nil, function() -- Fixup happens on refresh, not immediately.
eq(100000, api.nvim_get_option_value('scrollback', {}))
eq(1000000, api.nvim_get_option_value('scrollback', {}))
end)
-- _Local_ scrollback=-1 during TermOpen forces the maximum. #9605
command('setglobal scrollback=-1')
command('autocmd TermOpen * setlocal scrollback=-1')
command('terminal')
eq(100000, api.nvim_get_option_value('scrollback', {}))
eq(1000000, api.nvim_get_option_value('scrollback', {}))
end)
it(':setlocal in a normal buffer', function()