Commit Diff


commit - 9863381c8cac503847e844df9dcb38e0c73073a7
commit + 7c9e12dfe9e21d4d4d9797a77ec89359808c7d22
blob - b60ff4d9cc3db8f1cb3223f1a45a3768914373de
blob + aed5aef2f6f14cfbbf11cfb520bab412e2e27bdb
--- wrap.c
+++ wrap.c
@@ -132,7 +132,8 @@ wrap_text(struct buffer *buffer, const char *prfx, str
 		ret = grapheme_next_line_break_utf8(&line[off], SIZE_MAX);
 		t = utf8_swidth_between(&line[off], &line[off + ret]);
 
-		if (cur + t <= width) {
+		/* we can't reach the last column */
+		if (cur + t < width) {
 			cur += t;
 			continue;
 		}