From patchwork Wed Aug 20 19:24:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [2,of,2] color: enable default color for tabs (BC) From: =?utf-8?q?Jordi_Guti=C3=A9rrez_Hermoso?= X-Patchwork-Id: 5534 Message-Id: <9d34433f73b54557667d.1408562669@Iris> To: mercurial-devel@selenic.com Date: Wed, 20 Aug 2014 15:24:29 -0400 # HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1408562377 14400 # Wed Aug 20 15:19:37 2014 -0400 # Node ID 9d34433f73b54557667de9a8da77c7dde9e7c33c # Parent b58e6a9a966a2ae349db1af92943d2bc8898aa06 color: enable default color for tabs (BC) This makes the color extension by default highlight tabs in changed lines of a diff. I picked magenta as the color of a tab. diff --git a/hgext/color.py b/hgext/color.py --- a/hgext/color.py +++ b/hgext/color.py @@ -11,7 +11,7 @@ This extension modifies the status and r to their output to reflect file status, the qseries command to add color to reflect patch status (applied, unapplied, missing), and to diff-related commands to highlight additions, removals, diff headers, -and trailing whitespace. +tabs, and trailing whitespace. Other effects in addition to color, like bold and underlined text, are also available. By default, the terminfo database is used to find the @@ -45,6 +45,7 @@ Default effects may be overridden from y diff.deleted = red diff.inserted = green diff.changed = white + diff.tab = bold magenta_background diff.trailingwhitespace = bold red_background resolve.unresolved = red bold @@ -255,6 +256,7 @@ except ImportError: 'diff.file_b': 'green bold', 'diff.hunk': 'magenta', 'diff.inserted': 'green', + 'diff.tab': 'bold magenta_background', 'diff.trailingwhitespace': 'bold red_background', 'diffstat.deleted': 'red', 'diffstat.inserted': 'green',