diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/sed.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c index 85c8466..0fe82f3 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -767,7 +767,7 @@ static int do_subst_command(sed_cmd_t *sed_cmd, char **line_p) * second is "" before "d", third is "" after "d". * Second match is NOT replaced! */ - if (prev_match_empty || start != 0) { + if (prev_match_empty || start != 0 || start != end) { dbg("inserting replacement at %d in '%s'", start, line); do_subst_w_backrefs(line, sed_cmd->string); } else { |