Release v1.01 Enhanced: Vi Control, TUI Gen5, Core Stability
This commit is contained in:
@@ -25,6 +25,7 @@ const sortFiles = (files, dirPath) => {
|
||||
const FileTree = ({
|
||||
rootPath,
|
||||
onSelect,
|
||||
onOpen,
|
||||
selectedFiles = new Set(),
|
||||
isActive = false,
|
||||
height = 20,
|
||||
@@ -103,6 +104,11 @@ const FileTree = ({
|
||||
if (!expanded.has(item.path)) {
|
||||
setExpanded(prev => new Set([...prev, item.path]));
|
||||
}
|
||||
} else if (key.return) {
|
||||
const selectedItem = flatList[currentIndex];
|
||||
if (selectedItem && !selectedItem.isDir && typeof onOpen === 'function') {
|
||||
onOpen(selectedItem.path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user