commit a520d9c4eacb47dac2a3351c1d93ed06f3ad0d77
parent fa9e071b83805c0ee2289393d395e76fb559f8b3
Author: zeertzjq <zeertzjq@outlook.com>
Date: Wed, 18 Feb 2026 17:08:08 +0800
test: fix test failure causing following tests to fail (#37932)
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua
@@ -97,9 +97,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()