Skip to content

Commit a12cec9

Browse files
thomaslevesquegitster
authored andcommitted
userdiff.c: add C# async keyword in diff pattern
Currently C# async methods are not shown in diff hunk headers. I just added the async keyword to the csharp method pattern so that they are properly detected. Signed-off-by: Thomas Levesque <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 38e79b1 commit a12cec9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

userdiff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ PATTERNS("csharp",
138138
/* Keywords */
139139
"!^[ \t]*(do|while|for|if|else|instanceof|new|return|switch|case|throw|catch|using)\n"
140140
/* Methods and constructors */
141-
"^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe)[ \t]+)*[][<>@.~_[:alnum:]]+[ \t]+[<>@._[:alnum:]]+[ \t]*\\(.*\\))[ \t]*$\n"
141+
"^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe|async)[ \t]+)*[][<>@.~_[:alnum:]]+[ \t]+[<>@._[:alnum:]]+[ \t]*\\(.*\\))[ \t]*$\n"
142142
/* Properties */
143143
"^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe)[ \t]+)*[][<>@.~_[:alnum:]]+[ \t]+[@._[:alnum:]]+)[ \t]*$\n"
144144
/* Type definitions */

0 commit comments

Comments
 (0)