From 041b793f20e7d54a4257d8b00f71af2e017c4105 Mon Sep 17 00:00:00 2001 From: codetypes Date: Sat, 30 Nov 2024 16:05:34 +0800 Subject: [PATCH] fix not submit rename on press enter --- src/behavior3 | 2 +- src/components/explorer.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/behavior3 b/src/behavior3 index 06a5db5..af8eb16 160000 --- a/src/behavior3 +++ b/src/behavior3 @@ -1 +1 @@ -Subproject commit 06a5db59896bdfcb5f2ff449e01505a3e5293dd6 +Subproject commit af8eb167ad3a819b47ba3d794879b3f4e4543841 diff --git a/src/components/explorer.tsx b/src/components/explorer.tsx index 901a015..040d229 100644 --- a/src/components/explorer.tsx +++ b/src/components/explorer.tsx @@ -402,7 +402,7 @@ export const Explorer: FC = () => { useKeyDown([Hotkey.F2, isMacos ? Hotkey.Enter : ""], keysRef, (event) => { event.preventDefault(); const node = findFile(selectedKeys[0], workspace.fileTree!); - if (node && node !== workspace.fileTree) { + if (node && node !== workspace.fileTree && !node.editing) { dispatch("rename", node); } });