From: Johannes Sixt Date: Fri, 21 Mar 2014 21:07:13 +0000 (+0100) Subject: userdiff: support C++ ->* and .* operators in the word regexp X-Git-Tag: v2.0.0-rc0~45^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=407e07f2a6f55e605fda9e90cb622887269f68b5;p=thirdparty%2Fgit.git userdiff: support C++ ->* and .* operators in the word regexp The character sequences ->* and .* are valid C++ operators. Keep them together in --word-diff mode. Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- diff --git a/userdiff.c b/userdiff.c index 10b61ec37d..434535bd63 100644 --- a/userdiff.c +++ b/userdiff.c @@ -133,7 +133,7 @@ PATTERNS("cpp", /* -- */ "[a-zA-Z_][a-zA-Z0-9_]*" "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?" - "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->"), + "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->\\*?|\\.\\*"), PATTERNS("csharp", /* Keywords */ "!^[ \t]*(do|while|for|if|else|instanceof|new|return|switch|case|throw|catch|using)\n"