]> git.wh0rd.org Git - nano.git/commitdiff
Showing trailing whitespace on added lines in patches and diffs.
authorBenno Schulenberg <bensberg@justemail.net>
Fri, 16 May 2014 11:08:52 +0000 (11:08 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Fri, 16 May 2014 11:08:52 +0000 (11:08 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4897 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
doc/syntax/patch.nanorc

index b6484efb4954fdd02c011af29b42f822b671caa9..757ce5757e807ff10f3e4f84dcc7e2d50dbfe000 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2014-05-16  Benno Schulenberg  <bensberg@justemail.net>
        * 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  <pooka109@gmail.com>
        * src/color.c, src/cut.c, src/text.c: Tweak some whitespace.
index 5f101186c37105e59878d3d36c5342083f1713f3..f5c1dd597c330d7da089b3f9d06d0b1f99312dfc 100644 (file)
@@ -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.*"