sed: fix /regex/,+N match triggering only once, closes 11871

function                                             old     new   delta
process_files                                       2235    2246     +11

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2019-05-13 16:29:34 +02:00
parent 15021f393d
commit 0545bfa841
2 changed files with 8 additions and 0 deletions

View File

@@ -1097,6 +1097,8 @@ static void process_files(void)
int old_matched, matched;
old_matched = sed_cmd->in_match;
if (!old_matched)
sed_cmd->end_line = sed_cmd->end_line_orig;
/* Determine if this command matches this line: */