Skip to content

Commit fcc462a

Browse files
ThomasK33claude
andcommitted
test(selection): assert last_active_visual_selection cleared on disable
Why: DEREM-19 — without this assertion, the disable() clear at selection.lua:49 could be silently reverted without test failure. Change-Id: Icefe72a3fb867a541fca10077636673d12f47a04 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Thomas Kosiewski <tk@coder.com>
1 parent 6483893 commit fcc462a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/selection_test.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,13 +519,15 @@ describe("Selection module", function()
519519

520520
assert(selection.state.demotion_timer == nil)
521521
assert(selection.state.latest_selection == nil)
522+
assert(selection.state.last_active_visual_selection == nil)
522523
assert.are.equal(1, timer._stop_calls)
523524
assert.are.equal(1, timer._close_calls)
524525

525526
-- A late-firing callback from the cancelled timer must not mutate state after teardown.
526527
timer:fire()
527528
assert(selection.state.latest_selection == nil)
528529
assert(selection.state.demotion_timer == nil)
530+
assert(selection.state.last_active_visual_selection == nil)
529531
assert.are.equal(1, timer._stop_calls)
530532
assert.are.equal(1, timer._close_calls)
531533

0 commit comments

Comments
 (0)