Add file and project search panels
This commit is contained in:
@@ -155,6 +155,14 @@ pub const Stack = struct {
|
||||
return list.selected.?;
|
||||
}
|
||||
|
||||
pub fn activeListItem(self: *const Stack) ![]const u8 {
|
||||
const index = self.active_index orelse return Error.NoPanelOpen;
|
||||
const panel = self.panels.items[index];
|
||||
if (panel.kind != .list or panel.list == null) return Error.ActivePanelIsNotList;
|
||||
const list = panel.list.?;
|
||||
return self.visibleItemAt(list.cursor) orelse Error.EmptyList;
|
||||
}
|
||||
|
||||
pub fn cancelList(self: *Stack) !void {
|
||||
_ = try self.activeList();
|
||||
try self.closeActive();
|
||||
|
||||
Reference in New Issue
Block a user