diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-14 00:19:44 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-14 00:19:44 -0500 |
| commit | 3c9251ffbac127d9b3c234040bde39d833c667a9 (patch) | |
| tree | 0fed09e781e1c9f76f7f6a60ade9ee2645a57e60 /tests/test-prog-python-setup.el | |
| parent | 16c356ab236dbf4639b38eadfbcb6aacd4e29397 (diff) | |
| download | dotemacs-3c9251ffbac127d9b3c234040bde39d833c667a9.tar.gz dotemacs-3c9251ffbac127d9b3c234040bde39d833c667a9.zip | |
fix(ai-vterm): force buffer swap after F9 toggle-off in lone window
The original fix (c558951) set a flag at toggle-off and let the next toggle-on detect it. The flag mechanism is right, but the toggle-off itself wasn't observable when bury-buffer couldn't switch the lone window onto a different buffer -- `bury-buffer' falls back to `switch-to-prev-buffer', which no-ops when the window's prev-buffer history contains only the agent itself (common right after a `C-x 1' that cleared the surrounding windows' histories). Without an observable swap, the second F9 found the agent still displayed and routed back through toggle-off, looping the user with no visible effect.
Dispatcher now explicitly forces the window onto another buffer (`(other-buffer agent-buf t)`) when the lone window is still showing the agent after `bury-buffer'. The round-trip test now exercises the real `bury-buffer' path instead of simulating it; a new test asserts the lone window's buffer is non-agent after toggle-off.
Diffstat (limited to 'tests/test-prog-python-setup.el')
0 files changed, 0 insertions, 0 deletions
