[Bug 5416] New: pad(), label(), and color don't interact well
bugzilla at mercurial-scm.org
bugzilla at mercurial-scm.org
Sat Nov 5 13:41:34 UTC 2016
https://bz.mercurial-scm.org/show_bug.cgi?id=5416
Bug ID: 5416
Summary: pad(), label(), and color don't interact well
Product: Mercurial
Version: 4.0
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: feature
Priority: wish
Component: templater
Assignee: bugzilla at selenic.com
Reporter: gregory.szorc at gmail.com
CC: mercurial-devel at selenic.com, yuya at tcha.org
Say you want to create a template that uses pad() to create aligned columns.
Then say you want to add a label() around a column value so output can be
colorized. Each works on its own but when you combine them, things start to
fall apart.
If you do `pad(label())`, the expanded text from label() may contain
non-printable color escape sequences that count against the length of the
string and affect pad()'s behavior, leading to unexpected results.
If you do `label(pad())`, the labeling/coloring extends over the padding
character, which is likely a space. This could make output look weird due to
coloring of whitespace.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list