mirror of
https://github.com/sheumann/hush.git
synced 2025-01-03 00:31:16 +00:00
Fixed extra -- lines (noted by Christophe Boyanique).
This commit is contained in:
parent
117231c44f
commit
edc806507c
@ -60,7 +60,8 @@ static void print_line(const char *line, int linenum, char decoration)
|
|||||||
{
|
{
|
||||||
#ifdef BB_FEATURE_GREP_CONTEXT
|
#ifdef BB_FEATURE_GREP_CONTEXT
|
||||||
/* possibly print the little '--' seperator */
|
/* possibly print the little '--' seperator */
|
||||||
if (last_line_printed && last_line_printed < linenum - 1) {
|
if ((lines_before || lines_after) && last_line_printed &&
|
||||||
|
last_line_printed < linenum - 1) {
|
||||||
puts("--");
|
puts("--");
|
||||||
}
|
}
|
||||||
last_line_printed = linenum;
|
last_line_printed = linenum;
|
||||||
|
3
grep.c
3
grep.c
@ -60,7 +60,8 @@ static void print_line(const char *line, int linenum, char decoration)
|
|||||||
{
|
{
|
||||||
#ifdef BB_FEATURE_GREP_CONTEXT
|
#ifdef BB_FEATURE_GREP_CONTEXT
|
||||||
/* possibly print the little '--' seperator */
|
/* possibly print the little '--' seperator */
|
||||||
if (last_line_printed && last_line_printed < linenum - 1) {
|
if ((lines_before || lines_after) && last_line_printed &&
|
||||||
|
last_line_printed < linenum - 1) {
|
||||||
puts("--");
|
puts("--");
|
||||||
}
|
}
|
||||||
last_line_printed = linenum;
|
last_line_printed = linenum;
|
||||||
|
Loading…
Reference in New Issue
Block a user