diff options
Diffstat (limited to 'src/tagline.zig')
| -rw-r--r-- | src/tagline.zig | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tagline.zig b/src/tagline.zig index 68fa2645..d024be4e 100644 --- a/src/tagline.zig +++ b/src/tagline.zig @@ -286,10 +286,12 @@ pub fn wrapTag(arena: std.mem.Allocator, whole: []const u8, width: usize) !Shown return .{ .text = out.items, .soft = soft.items }; } -/// The tag's width for wrapping: its columns, one kept for the caret past -/// a full row's end. +/// The tag's width for wrapping: all its columns. A row the text fills +/// exactly stays one row, as acme's frame wraps a box only when it is wider +/// than what is left (libframe frutil.c _frcklinewrap), and the caret past +/// its end sits at the edge (frptofchar.c clamps it to r.max.x). pub fn tagWidth(p: *const Pardes, id: usize) usize { - return @max(1, @as(usize, p.tagCapacity(p.rects[id].w -| TAG_TEXT_INSET)) -| 1); + return @max(1, @as(usize, p.tagCapacity(p.rects[id].w -| TAG_TEXT_INSET))); } pub fn shownTag(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !Shown { |
