feat: enter

This commit is contained in:
2025-05-26 17:47:52 +02:00
parent 726908bfbe
commit 426ce71be4
2 changed files with 9 additions and 1 deletions

View File

@@ -10,7 +10,13 @@ pub fn handle(action: Action, appState: *AppState, arena: std.mem.Allocator) !Ac
} else return error.NoParent;
} else return error.NoCurrentLocation;
},
.Enter => {},
.Enter => {
if (appState.currentTab.currentItem) |currentItem| {
const path = try arena.dupe(u8, currentItem.path);
try appState.currentTab.setCurrentLocation(.{ .path = path });
return ActionResult.Handled;
} else return error.NoCurrentLocation;
},
.SelectNext => {
return selectNextIndex(appState.currentTab, .Next);
},