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 | 9600611d5f8382ffc849d56a67ba5eb980d64e04 (patch) | |
| tree | 1bf5e900196513356213e9f1639b73bf01b20099 /gptel-tools/read_buffer.el | |
| parent | d97800f565810fda4e166a708e9b1df6f72d054c (diff) | |
| download | dotemacs-9600611d5f8382ffc849d56a67ba5eb980d64e04.tar.gz dotemacs-9600611d5f8382ffc849d56a67ba5eb980d64e04.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 'gptel-tools/read_buffer.el')
0 files changed, 0 insertions, 0 deletions
