From 233817437ded7a4a7505bc2cdb01eb7c953472c2 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Thu, 17 May 2001 01:02:58 +0000 Subject: Always print a newline after a matching substitution. --- editors/sed.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'editors/sed.c') diff --git a/editors/sed.c b/editors/sed.c index 1c227704e..16e8e1866 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -577,12 +577,7 @@ static int do_subst_command(const struct sed_cmd *sed_cmd, const char *line) break; } - /* if there's anything left of the line, print it */ - if (*hackline) - puts(hackline); - /* otherwise, we need to print a newline */ - else - printf("\n"); + puts(hackline); /* cleanup */ free(regmatch); -- cgit v1.2.3