D3212: patch: implement a new worddiff algorithm
spectral (Kyle Lippincott)
phabricator at mercurial-scm.org
Mon Apr 9 21:03:59 EDT 2018
spectral added inline comments.
INLINE COMMENTS
> color.py:94
> + 'diff.deleted.changed': 'red',
> + 'diff.deleted.unchanged': 'red dim',
> 'diff.diffline': 'bold',
These are the first uses of 'dim' in the default set of things, and I don't think we can rely on it; for color.mode=auto, we really mean "ansi" (aka ecma48) (unless on windows), and don't do any detection of capabilities, so we just output \e[2m and some terminals just ignore that (like mine, rxvt-unicode v9.22). If using color.mode=terminfo, we at least get error messages (I did --config color.log.user='dim green'):
ignoring unknown color/effect 'dim' (configured in color.log.user)
Apparently cygwin doesn't advertise 'dim', and while the linux virtual console advertises it and supports it, it doesn't actually support a dim color (at least on my machine), it just always puts it in a weird blue :)
I think I'd prefer that `changed` be bold and `unchanged` be non-bold. For most terminals, that'll lead to a visible difference in intensity (bold being brighter unless using a weird palette), and for those that aren't configured for that, it'll at least be a heavier weight. It's better than having literally zero difference between them without any explanation why. I think it'll also be more obvious which lines have it; in your screenshot the difference between dim and regular is pretty subtle.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3212
To: quark, #hg-reviewers, durin42
Cc: spectral, mercurial-devel
More information about the Mercurial-devel
mailing list