@brimveyn/aimux 1.14.5 → 1.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -165,6 +165,18 @@ export function useTerminalResize({
|
|
|
165
165
|
// loop so an unchanged box never re-triggers a resize.
|
|
166
166
|
const measuredRef = useRef(new Map<string, { cols: number; rows: number }>())
|
|
167
167
|
|
|
168
|
+
// Drop the dedupe cache when the workspace changes. attach() re-gates every
|
|
169
|
+
// restored tab's paneReady to false; if a tabId carries the same dimensions
|
|
170
|
+
// across workspaces, handleMeasure's prev-match would short-circuit and
|
|
171
|
+
// never call resizeTab({confirmedFromMeasurement:true}), leaving the gate
|
|
172
|
+
// closed forever — the new pane then paints a stale buffered snapshot from
|
|
173
|
+
// the old workspace, which is the 2–3 row offset users see.
|
|
174
|
+
const lastSessionIdRef = useRef(state.currentSessionId)
|
|
175
|
+
if (lastSessionIdRef.current !== state.currentSessionId) {
|
|
176
|
+
lastSessionIdRef.current = state.currentSessionId
|
|
177
|
+
measuredRef.current.clear()
|
|
178
|
+
}
|
|
179
|
+
|
|
168
180
|
// Closed measurement loop: the rendered terminal content box reports its
|
|
169
181
|
// real geometry; that — not the hardcoded chrome model below — is the
|
|
170
182
|
// authority for the PTY/xterm size and the mouse-mapping origin. The model
|