commit f3c7d9604106a82141e9ab7f14b388d3a8cea8eb from: Omar Polo date: Tue Aug 24 13:45:23 2021 UTC simplify wrap_page and fix wrapping of pre text The column at which preformatted text should be formatted is the same as the "normal" text, so why the difference? MIN(fill_column, width) is always the correct choice for wrapping the text. commit - ea00395a5e2255f146530271d94dd82ef8c427d0 commit + f3c7d9604106a82141e9ab7f14b388d3a8cea8eb blob - d1e48af78a5e7a3ccf3276a6dd3d997df2e97fb7 blob + 70bc02d732917d8c2bc6ede2b3458d1617b2591c --- wrap.c +++ wrap.c @@ -239,7 +239,6 @@ wrap_page(struct buffer *buffer, int width) struct line *l; const struct line *top_orig, *orig; struct vline *vl; - int pre_width; const char *prfx; top_orig = buffer->top_line == NULL ? NULL : buffer->top_line->parent; @@ -274,11 +273,7 @@ wrap_page(struct buffer *buffer, int width) case LINE_PATCH_HUNK_HDR: case LINE_PATCH_ADD: case LINE_PATCH_DEL: - if (olivetti_mode) - pre_width = MIN(fill_column, width); - else - pre_width = width; - hardwrap_text(buffer, l, pre_width); + hardwrap_text(buffer, l, MIN(fill_column, width)); break; case LINE_COMPL: case LINE_COMPL_CURRENT: