Fix keybindings not working for ephemeral nodes (#1678)

This commit is contained in:
Evan Simkowitz 2025-01-03 12:02:19 -05:00 committed by GitHub
parent e388128010
commit a219ea5c9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -283,7 +283,11 @@ export class LayoutModel {
this.magnifiedNodeSizeAtom = getSettingsKeyAtom("window:magnifiedblocksize");
this.focusedNode = atom((get) => {
const ephemeralNode = get(this.ephemeralNode);
const treeState = get(this.treeStateAtom);
if (ephemeralNode) {
return ephemeralNode;
}
if (treeState.focusedNodeId == null) {
return null;
}