diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-13 15:33:38 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-13 15:33:38 -0500 |
| commit | aeeecbc0e00e1c6b02a8fb3a44f1c9ce43dba403 (patch) | |
| tree | b9a75c398af95305c63111a03bf3c4cbe0ba27ae /init.el | |
| parent | 128244f9c8ed80a4a2ff21bcb2660714e990b6c6 (diff) | |
| download | dotemacs-aeeecbc0e00e1c6b02a8fb3a44f1c9ce43dba403.tar.gz dotemacs-aeeecbc0e00e1c6b02a8fb3a44f1c9ce43dba403.zip | |
fix(ai-vterm): preserve single-window layout across F9 toggle
When the agent buffer is the only window in the frame, F9 buries it (correct) but the next F9 redisplayed it as a side split instead of restoring the full-frame layout -- the display-saved path always called `display-buffer-in-direction`, which insists on a split.
New `cj/--ai-vterm-last-was-bury` flag tracks which toggle-off path ran. `cj/ai-vterm` sets it to t in the bury branch (one-window-p) and nil in the delete-window branch. `cj/--ai-vterm-display-saved` checks the flag at toggle-on: if t and the frame is still single-window, it replaces the selected window's buffer in place rather than splitting. Either branch consumes the flag so it never stays stale.
5 tests in test-ai-vterm--single-window-toggle.el cover the flag's set/clear paths, the still-one-window guard, and the end-to-end roundtrip.
Diffstat (limited to 'init.el')
0 files changed, 0 insertions, 0 deletions
