diff options
Diffstat (limited to 'src/panes.zig')
| -rw-r--r-- | src/panes.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/panes.zig b/src/panes.zig index 8d4330e9..0b565676 100644 --- a/src/panes.zig +++ b/src/panes.zig @@ -344,6 +344,13 @@ 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 { + const at = p.promptAt() orelse return null; + return p.tagSlice()[@min(at, p.tag_tail_len)..]; + } + pub fn appendTag(p: *Pane, text: []const u8) bool { if (text.len > p.tag_tail.len - p.tag_tail_len) return false; @memcpy(p.tag_tail[p.tag_tail_len..][0..text.len], text); |
