aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2019-05-13 16:29:34 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2019-05-13 16:30:39 +0200
commit0545bfa841540a0d7d7e2953bc205eda64144c2e (patch)
treeeff3d12359575675aefd94eca2d501fc2ebdcfbc /editors
parent15021f393d3d19d689028fceb5c35da930059430 (diff)
downloadbusybox-0545bfa841540a0d7d7e2953bc205eda64144c2e.tar.gz
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>
Diffstat (limited to 'editors')
-rw-r--r--editors/sed.c2
1 files changed, 2 insertions, 0 deletions
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: */