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 | c5589514680e36e65c848f2c99ad0cd6f2b23306 (patch) | |
| tree | ee098bec2813b0829bf73a5e44cd5a0ff00be675 /scripts | |
| parent | 4bbbe91ce0ae391cf362fb7547cf200c1b07f311 (diff) | |
| download | dotemacs-c5589514680e36e65c848f2c99ad0cd6f2b23306.tar.gz dotemacs-c5589514680e36e65c848f2c99ad0cd6f2b23306.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 'scripts')
0 files changed, 0 insertions, 0 deletions
