feat: enter
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user