fix: reflow width is off by one
This commit is contained in:
parent
9f775c9ec8
commit
9c4f30c4ee
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ pub fn reflow(allocator: std.mem.Allocator, text: []const u8, width: usize) erro
|
|||
continue :blk .words;
|
||||
},
|
||||
.words => {
|
||||
if (line_len + word.len + 1 >= width) {
|
||||
if (line_len + word.len + 1 >= width - 1) {
|
||||
try writer.writeByte('\n');
|
||||
line_len = 0;
|
||||
continue :blk .begin;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue