From 0545bfa841540a0d7d7e2953bc205eda64144c2e Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 13 May 2019 16:29:34 +0200 Subject: sed: fix /regex/,+N match triggering only once, closes 11871 function old new delta process_files 2235 2246 +11 Signed-off-by: Denys Vlasenko --- editors/sed.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'editors') diff --git a/editors/sed.c b/editors/sed.c index bb39de149..57d3dda16 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -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: */ -- cgit v1.2.3