From: Benno Schulenberg Date: Fri, 16 May 2014 11:08:52 +0000 (+0000) Subject: Showing trailing whitespace on added lines in patches and diffs. X-Git-Tag: v2.3.3~33 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=3edcfd283b566916447f103ca707c70420e34697;p=nano.git Showing trailing whitespace on added lines in patches and diffs. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4897 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index b6484efb..757ce575 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2014-05-16 Benno Schulenberg * src/text.c, src/winio.c: Remove some more double spaces. + * doc/syntax/patch.nanorc: Show trailing whitespace on added lines. 2014-05-16 David Lawrence Ramsey * src/color.c, src/cut.c, src/text.c: Tweak some whitespace. diff --git a/doc/syntax/patch.nanorc b/doc/syntax/patch.nanorc index 5f101186..f5c1dd59 100644 --- a/doc/syntax/patch.nanorc +++ b/doc/syntax/patch.nanorc @@ -1,11 +1,21 @@ ## Here is an example for patch files. -## + syntax "patch" "\.(patch|diff)$" magic "diff output text" + +# Added lines. color brightgreen "^\+.*" -color green "^\+\+\+.*" +# Show trailing whitespace only on added lines. +color ,green "[[:space:]]+$" +# Context lines. color brightblue "^ .*" +# Deleted lines. color brightred "^-.*" + +# File names and dates. color red "^---.*" +color green "^\+\+\+.*" +# Line numbers. color brightyellow "^@@.*" +# Header lines. color magenta "^diff.*"