diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-18 14:06:46 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-18 14:06:46 -0500 |
| commit | 38ce367d92e66e8a8e91e12af7a935097fb6f00b (patch) | |
| tree | bf9480e8f71d89ce48098e92948a4b5a57a0c080 | |
| parent | eeafb35ff25a8fe060fd1f98b51a758bf88e2aa1 (diff) | |
| download | dotemacs-38ce367d92e66e8a8e91e12af7a935097fb6f00b.tar.gz dotemacs-38ce367d92e66e8a8e91e12af7a935097fb6f00b.zip | |
docs(ai-term): match reuse-edge docstring to delete-window reality
The docstring promised toggle-off puts the displaced buffer back via quit-restore-window. Toggle-off deliberately deletes the window instead: the slot's quit-restore parameter goes stale when several agents share it. That staleness is the "F9 shows another agent" bug the delete-window design killed.
| -rw-r--r-- | modules/ai-term-display.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/ai-term-display.el b/modules/ai-term-display.el index b78a2638..fdb2b7ed 100644 --- a/modules/ai-term-display.el +++ b/modules/ai-term-display.el @@ -248,10 +248,13 @@ or a layout split on the other axis), so the chain falls through to nil when the edge window is dedicated -- those are not ours to replace. Records the displaced buffer through `display-buffer-record-window' -\(type `reuse') before swapping, so the native `quit-restore-window' -called at toggle-off puts that buffer back into the slot instead of -deleting the window -- toggling swaps the slot's buffer between the -displaced buffer and the agent, never changing the window count. +\(type `reuse') before swapping. Toggle-off does NOT put that buffer +back: `cj/--ai-term-toggle-off' deletes the agent's window outright in +multi-window layouts, because the slot's `quit-restore' parameter goes +stale when several agents share it (see its docstring). The displaced +buffer stays alive and reachable through normal buffer switching; the +record call just keeps the window's `quit-restore' parameter accurate +for native `quit-window' paths outside the toggle. Runs after `cj/--ai-term-reuse-existing-agent', so an agent already on screen has been handled already; the window reused here always holds a |
