diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-02 13:04:37 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-02 13:04:37 -0500 |
| commit | 3b479796544e7d2116f1400f267a5bb15c0b9fce (patch) | |
| tree | af575550e9b4834c0a0cd8fc5b3362472a124510 /tests/test-init-module-headers.el | |
| parent | 5d3b31574b24df555bda7bcfd4ef5b4a6623d1a9 (diff) | |
| download | dotemacs-3b479796544e7d2116f1400f267a5bb15c0b9fce.tar.gz dotemacs-3b479796544e7d2116f1400f267a5bb15c0b9fce.zip | |
fix(ai-vterm): make F9 a faithful toggle of the agent split
F9 toggle-off used quit-restore-window to dismiss the agent. With several agents alive sharing one slot, switching among them (C-F9) reuses the window via set-window-buffer, which leaves the window's quit-restore parameter pointing at the first agent shown. Once stale, quit-restore-window falls back to switch-to-prev-buffer and surfaces a different agent instead of removing the window, so F9 appeared to "show another agent" rather than hide the split.
Toggle-off now collapses the split with delete-window, which is independent of the slot's buffer history, so the working buffer reclaims the frame. Geometry is captured first so the next toggle-on re-splits at the same width.
Toggle-on reopens the exact agent that was hidden (new cj/--ai-vterm-last-hidden-buffer), falling back to the most-recent agent only when that buffer has been killed. Hide-then-show is now a faithful round trip, not a jump to whichever agent is most-recent in buffer-list.
Sole-window toggle-off returns to the most-recent non-agent buffer instead of other-buffer, which could land on another agent.
I updated the two reuse-edge-window tests that asserted the old restore-displaced-into-a-kept-slot behavior to match the new always-collapse behavior.
Diffstat (limited to 'tests/test-init-module-headers.el')
0 files changed, 0 insertions, 0 deletions
