Add file and project search panels

This commit is contained in:
slhx agent
2026-06-21 13:11:56 +02:00
parent 70ef989c2a
commit 1d1ecf29d5
5 changed files with 240 additions and 28 deletions
+8
View File
@@ -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();