summaryrefslogtreecommitdiff
path: root/src/tagline.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/tagline.zig')
-rw-r--r--src/tagline.zig7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/tagline.zig b/src/tagline.zig
index b6601d61..e668419d 100644
--- a/src/tagline.zig
+++ b/src/tagline.zig
@@ -192,12 +192,7 @@ pub fn defaultTail(pane: *const Pane) []const u8 {
/// The tag as it is shown, read and pointed at: its computed prefix and
/// its own text after it.
pub fn tagText(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) ![]u8 {
- const prefix = try tagPrefix(p, pane);
- const tail = curTail(pane);
- const out = try arena.alloc(u8, prefix.len + tail.len);
- @memcpy(out[0..prefix.len], prefix);
- @memcpy(out[prefix.len..], tail);
- return out;
+ return std.mem.concat(arena, u8, &.{ try tagPrefix(p, pane), curTail(pane) });
}
/// Give the keyboard to the tag in normal mode (`:`), its cursor where