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 | 38dad925528e05f2084474ead5519a6a6ceb70f7 (patch) | |
| tree | 84f4928e3e9b3fdb88be8d73a4db46728beacc41 /tests/test-integration-calendar-sync-exdate.el | |
| parent | 76f983eff93e6d37d0710d2854361a8314f63d79 (diff) | |
| download | dotemacs-38dad925528e05f2084474ead5519a6a6ceb70f7.tar.gz dotemacs-38dad925528e05f2084474ead5519a6a6ceb70f7.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-integration-calendar-sync-exdate.el')
0 files changed, 0 insertions, 0 deletions
