mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-08-29 18:31:33 +00:00
fix: restore split layout selection (#1310)
This commit is contained in:
+3
-2
@@ -550,8 +550,9 @@ export function AppShell({
|
||||
});
|
||||
}, []);
|
||||
const skipSplitSyncRef = useRef(false);
|
||||
const activeTabAvailable = tabs.some((tab) => tab.id === activeTabId);
|
||||
useEffect(() => {
|
||||
const active = tabsRef.current.find((tab) => tab.id === activeTabId);
|
||||
const active = tabs.find((tab) => tab.id === activeTabId);
|
||||
const config = active?.type === "split-screen" ? active.splitConfig : null;
|
||||
skipSplitSyncRef.current = true;
|
||||
if (!config) {
|
||||
@@ -565,7 +566,7 @@ export function AppShell({
|
||||
setRowSizes(config.rowSizes);
|
||||
setRowColSizes(config.rowColSizes);
|
||||
setFocusedPaneIndex(0);
|
||||
}, [activeTabId]);
|
||||
}, [activeTabId, activeTabAvailable]);
|
||||
|
||||
useEffect(() => {
|
||||
if (skipSplitSyncRef.current) {
|
||||
|
||||
Reference in New Issue
Block a user