From 558723421f320d00a1d9c7704cae567a00e17310 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 22 Jun 2026 12:51:15 -0400 Subject: chore(todo): mark jumper register-hygiene bug done --- todo.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/todo.org b/todo.org index 688d19352..eb8d6a776 100644 --- a/todo.org +++ b/todo.org @@ -4014,10 +4014,12 @@ Tie this into the existing coverage work: - Tests cover adapter detection, command building, scope resolution, result storage, and key interactive paths. -** TODO [#B] jumper: register collisions and dead-marker errors :bug:solo: +** DONE [#B] jumper: register collisions and dead-marker errors :bug:solo: +CLOSED: [2026-06-22 Mon] :PROPERTIES: :LAST_REVIEWED: 2026-06-13 :END: +Fixed 2026-06-22: (1) store now allocates the first unused register char in the live slice (=jumper--first-free-register=) instead of by next-index, and removal clears the freed register, so a store after a removal no longer overwrites a surviving slot's marker; (2) =jumper--with-marker-at= guards =(buffer-live-p (marker-buffer marker))= so killed-buffer entries are skipped instead of signaling wrong-type errors; (3) the single-location toggle jumps back to the last-location register when set (returns =jumped-back=). New =test-jumper--register-hygiene.el= (8 tests); all 42 jumper tests green. Pre-existing unused-lexical =i= warning in =jumper--location-exists-p= left alone (separate nit). Two related defects from the 2026-06 config audit: - =modules/jumper.el:155= — removal shifts the vector without renumbering registers, so a later store allocates a register still held by a surviving location and silently overwrites it. Allocate the first free register char in the live slice; =set-register nil= on removal so freed markers don't pin buffers. - =modules/jumper.el:117,132= — guards check =(markerp marker)= but not =(buffer-live-p (marker-buffer marker))=; after killing a buffer holding a location, M-SPC SPC and M-SPC j signal wrong-type errors. Treat dead entries as skippable/removable. -- cgit v1.2.3