@@ -283,7 +283,7 @@ describe("claudecode.terminal.native toggle behavior", function()
283
283
284
284
-- Verify initial state - buffer should exist and have a window
285
285
assert .is_not_nil (mock_state .buffers [initial_bufnr ])
286
- assert .are .equal (" wipe " , mock_state .buffers [initial_bufnr ].options .bufhidden )
286
+ assert .are .equal (" hide " , mock_state .buffers [initial_bufnr ].options .bufhidden )
287
287
288
288
-- Find the window that contains our terminal buffer
289
289
local terminal_winid = nil
@@ -306,10 +306,7 @@ describe("claudecode.terminal.native toggle behavior", function()
306
306
assert .are .equal (initial_bufnr , native_provider .get_active_bufnr ())
307
307
assert .is_not_nil (mock_state .buffers [initial_bufnr ])
308
308
309
- -- 2. bufhidden should have been set to "hide" (this is the core fix)
310
- assert .are .equal (" hide" , mock_state .buffer_options [initial_bufnr ].bufhidden )
311
-
312
- -- 3. Window should be closed/invalid
309
+ -- 2. Window should be closed/invalid
313
310
assert .is_nil (mock_state .windows [terminal_winid ])
314
311
end )
315
312
@@ -383,7 +380,6 @@ describe("claudecode.terminal.native toggle behavior", function()
383
380
-- Toggle should hide but preserve process
384
381
native_provider .toggle (cmd_string , env_table , config )
385
382
assert .are .equal (initial_bufnr , native_provider .get_active_bufnr ())
386
- assert .are .equal (" hide" , mock_state .buffer_options [initial_bufnr ].bufhidden )
387
383
388
384
-- Close should kill the process (cleanup_state called)
389
385
native_provider .close ()
@@ -415,8 +411,7 @@ describe("claudecode.terminal.native toggle behavior", function()
415
411
mock_state .current_win = 1 -- Different window
416
412
native_provider .simple_toggle (cmd_string , env_table , config )
417
413
418
- -- Should have hidden the terminal (set bufhidden=hide and closed window)
419
- assert .are .equal (" hide" , mock_state .buffer_options [initial_bufnr ].bufhidden )
414
+ -- Should have hidden the terminal (closed window)
420
415
assert .is_nil (mock_state .windows [terminal_winid ])
421
416
end )
422
417
@@ -530,7 +525,6 @@ describe("claudecode.terminal.native toggle behavior", function()
530
525
native_provider .focus_toggle (cmd_string , env_table , config )
531
526
532
527
-- Should have hidden the terminal
533
- assert .are .equal (" hide" , mock_state .buffer_options [initial_bufnr ].bufhidden )
534
528
assert .is_nil (mock_state .windows [terminal_winid ])
535
529
end )
536
530
end )
0 commit comments