Commit b904965
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 ba7ea87 commit b904965
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 | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
138 | 159 | | |
139 | 160 | | |
140 | 161 | | |
| |||
0 commit comments