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 | 2498c57cb49e01f6a9bf20f76f500d0e2c8eb083 (patch) | |
| tree | ba249190ae07a80fcd71c0764b2afb1d003048a5 /modules/help-utils.el | |
| parent | f93969660b58e96d1acc2bbc4a3bb38955ef0eee (diff) | |
| download | dotemacs-2498c57cb49e01f6a9bf20f76f500d0e2c8eb083.tar.gz dotemacs-2498c57cb49e01f6a9bf20f76f500d0e2c8eb083.zip | |
fix(ai-vterm): force buffer swap after F9 toggle-off in lone window
The original fix (df2b59b) 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 'modules/help-utils.el')
0 files changed, 0 insertions, 0 deletions
