test: fix test failure causing following tests to fail (#37932)

(cherry picked from commit a520d9c4ea)
This commit is contained in:
zeertzjq
2026-02-18 17:08:08 +08:00
committed by github-actions[bot]
parent b072f89d1e
commit f6bc9efe62

View File

@@ -78,9 +78,8 @@ local function test_terminal_scrollback(hide_curbuf)
screen = tt.setup_screen(nil, nil, 30)
buf = api.nvim_get_current_buf()
chan = api.nvim_get_option_value('channel', { buf = buf })
if hide_curbuf then
otherbuf = api.nvim_create_buf(true, false)
end
otherbuf = hide_curbuf and api.nvim_create_buf(true, false) or nil
restore_terminal_mode = nil
end)
describe('when the limit is exceeded', function()