summaryrefslogtreecommitdiff
path: root/core/Band.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/Band.zig')
-rw-r--r--core/Band.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/Band.zig b/core/Band.zig
index 079a1bcc..7f9cfc7b 100644
--- a/core/Band.zig
+++ b/core/Band.zig
@@ -27,6 +27,7 @@ const panes = @import("panes.zig");
const builtins = @import("builtins.zig");
const TagState = @import("TagState.zig");
const Names = @import("Names.zig");
+const Prompt = @import("Prompt.zig");
const Pardes = pardes.Pardes;
const Pane = pardes.Pane;
const File = panes.File;
@@ -89,6 +90,7 @@ pub fn takes(p: *Pardes, id: usize) u16 {
.rest => {},
.help => return @max(doc_rows, @max(1, @min(Cursor.shown, s.nhits))),
.describe => return 0,
+ .prompt => return Prompt.takes(p),
}
if (!s.unrolled) return 0;
const cur = TagState.current(p, v) orelse return 0;
@@ -117,6 +119,12 @@ pub fn of(p: *Pardes, arena: std.mem.Allocator, pane: *Pane, id: usize) !?Band {
return band;
},
.describe => return null,
+ .prompt => {
+ var steps: [max_steps]Step = undefined;
+ for (try Prompt.steps(p, arena, &steps)) |step| band.add(step);
+ try band.place(p, arena, pane, id);
+ return band;
+ },
}
const cur = TagState.current(p, v).?;
// The level, its cursor on the child it names, else the leaf its group