summaryrefslogtreecommitdiff
path: root/src/panes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/panes.zig')
-rw-r--r--src/panes.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/panes.zig b/src/panes.zig
index 0b565676..0b4204aa 100644
--- a/src/panes.zig
+++ b/src/panes.zig
@@ -94,6 +94,9 @@ pub const Pane = struct {
pipe: struct { at: u16, how: modal.Normal.PipeBehavior },
/// Save on a scratch buffer or a terminal: the tail is a path to write to.
save: u16,
+ /// Del from the keyboard with open panes both above and below: which
+ /// one takes the rows. Nothing is typed; one key answers.
+ del_side,
};
pub const Cwd = union(enum) { none, inherited: *Pane, owned: []u8 };
@@ -338,7 +341,7 @@ pub const Pane = struct {
}
pub fn promptAt(p: *const Pane) ?u16 {
return switch (p.prompt) {
- .none => null,
+ .none, .del_side => null,
.search, .save => |at| at,
.pipe => |pipe| pipe.at,
};
@@ -347,6 +350,7 @@ pub const Pane = struct {
/// What an open prompt shows on its notice band: the one answer every
/// painter of the band reads.
pub fn promptText(p: *const Pane) ?[]const u8 {
+ if (p.prompt == .del_side) return config.del_question;
const at = p.promptAt() orelse return null;
return p.tagSlice()[@min(at, p.tag_tail_len)..];
}