--- code/trunk/pcregrep.c 2007/02/24 21:41:08 84 +++ code/trunk/pcregrep.c 2007/02/24 21:41:13 85 @@ -55,7 +55,7 @@ typedef int BOOL; -#define VERSION "4.0 07-Jun-2005" +#define VERSION "4.1 05-Sep-2005" #define MAX_PATTERN_COUNT 100 #if BUFSIZ > 8192 @@ -531,9 +531,11 @@ } /* Now print the matching line(s); ensure we set hyphenpending at the end - of the file. */ + of the file if any context lines are being output. */ + + if (after_context > 0 || before_context > 0) + endhyphenpending = TRUE; - endhyphenpending = TRUE; if (printname != NULL) fprintf(stdout, "%s:", printname); if (number) fprintf(stdout, "%d:", linenumber);