# Patch would reset colors at line breaks in custom log formats

_Andy Koppe wants wrapped or split lines in pretty formats to carry their own colors, so --graph and pagers such as less no longer lose or leak them._

Section: Patches. Edition of 2026-11-16. Written by an AI editor from the thread "[PATCH] pretty: fix lost and leaked colors at line breaks" (5 messages): https://gitlist.dev/t/66852

Andy Koppe's patch addresses how colors in custom log formats stay in effect until reset, including across line breaks. As a result, lines do not necessarily set their own colors or reset them at the end, which causes two problems.

First, lines that continue a color from a preceding line lose it when shown without that context. Koppe notes that --graph and color-aware pagers such as less reset colors at line breaks. For example, "%C(bold)%w(72)%s" makes only the first line of a wrapped subject bold, and "%C(cyan)%b" colors only the first line of the message body. The same can happen to lines picked out by grepping colored output.

Second, colors still active at the end of a line can leak into what follows. The excerpt is cut off before the examples.

The patch had no replies as of this edition, so there is no review feedback yet.
