From 378984bd87230c78a2344e39c5767703aa8f96d8 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Tue, 5 Mar 2024 15:46:44 -0600 Subject: [PATCH] print: fix bounds for word wrap Let words go all the way to the end Signed-off-by: Tim Culverhouse --- src/Window.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Window.zig b/src/Window.zig index b14b230..55e4346 100644 --- a/src/Window.zig +++ b/src/Window.zig @@ -174,7 +174,7 @@ pub fn print(self: Window, segments: []Segment, opts: PrintOptions) !bool { // break lines when we can't fit this word, and the word isn't longer // than our width const word_width = self.gwidth(word.bytes); - if (word_width + col >= self.width and word_width < self.width) { + if (word_width + col > self.width and word_width < self.width) { row += 1; col = 0; wrapped = true;