Re: [PATCH v2 09/11] add -i (Perl version): include indentation in the colored header
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Nov 13, 2020, 16:12 UTC
- Message-ID
- <041e9ff3-2447-e55d-f40d-079a84f0ad44@gmail.com>
- In-Reply-To
- <nycvar.QRO.7.76.6.2011131457420.18437@tvgsbejvaqbjf.bet>
Hi Dscho
On 13/11/2020 13:58, Johannes Schindelin wrote:
Show 25 quoted lines
> Hi Phillip, > > On Fri, 13 Nov 2020, Phillip Wood wrote: > >> On 11/11/2020 12:28, Johannes Schindelin via GitGitGadget wrote: >>> From: Johannes Schindelin <johannes.schindelin@gmx.de> >>> >>> The header is formatted by padding each column heading with spaces up to >>> the length of 12 characters. These padding spaces are naturally included >>> when coloring the entire header. >>> >>> However, the preceding five spaces indentation for non-flat lists were >>> _not_ included in the Perl version, but _were_ included in the built-in >>> version. Let's adjust the former to align with the latter's behavior. >> >> I had trouble understanding this. I think my confusion is that the padding was >> printed when the header was colored, but it was not inside the colored part >> whereas the subject lead be to think there was no indentation printed when the >> header was colored. > > Right, this is ambiguous, but I thought it was clear from the first > paragraph that "included" means "when coloring". > > I'm not a native speaker, though, so I welcome suggestions to improve > this.
Maybe something along the lines of
add -i (Perl version): color header to match the C version
Both versions of `add -i` indent non-flat lists by five spaces. However when using color the C version prints these spaces after the ANSI color codes whereas the Perl version prints them before the color codes. Change the Perl version to match the C version to make testing easier.
Best Wishes
Phillip
Show 8 quoted lines
>> I assume this change is so that we can use the same test for both >> versions? > > Correct. > > Thanks, > Dscho >