Commit c3c6c7b
committed
fix(plot): reconnect orphaned jgd device on reattach
After a VS Code window reload, the JGD socket server starts on a new
socket path and the attach script updates JGD_SOCKET accordingly. But a
jgd device opened before the reload remains bound to the old, dead
socket: jgd::jgd() only reads JGD_SOCKET at device-creation time, so the
stale device never reconnects and subsequent plots silently render to
nowhere (reported by @renkun-ken for self-managed arf/tmux sessions).
In register_hooks(), when the jgd backend is active, detect an existing
jgd device, record its current plot, close it, and reopen jgd::jgd() so
it binds to the current socket — replaying the recorded plot so it
reappears after reload. No-ops when no jgd device is open.
Bump sess to 3.0.1 so the attach script reinstalls the corrected package
for sessions that already have 3.0.0.1 parent b9e93bc commit c3c6c7b
2 files changed
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
121 | 142 | | |
122 | 143 | | |
123 | 144 | | |
| |||
0 commit comments