[Users] Better colored syntax highlighting of diffs

Andreas Ronnquist mailinglists at gusnan.se
Sat Apr 25 19:21:44 CEST 2015


It could be nice to be able to differ diff lines that begin with
+- from lines that begin with ++

for example a diff like this:

+--- ppp-2.4.6.orig/pppd/plugins/radius/util.c
++++ ppp-2.4.6/pppd/plugins/radius/util.c
+@@ -77,7 +77,7 @@ rc_mksid (void)
+   static unsigned short int cnt = 0;
+   sprintf (buf, "%08lX%04X%02hX",
+ 	   (unsigned long int) time (NULL),
+-	   (unsigned int) getpid (),
++	   (unsigned int) getpid () % 65535,
+ 	   cnt & 0xFF);
+   cnt++;
+   return buf;

It is useful for at least some debian mailinglists where a diff can
contain a patch (as different from a diff _being_ a patch). As it is
now, a line starting with ++ is the same color as if starting with +-.

best
-- Andreas Rönnquist
mailinglists at gusnan.se
gusnan at gusnan.se

[Please don't CC me, if I mail to a mailinglist, I am subscribed to it.]



More information about the Users mailing list