* editors/sed.c (process_file): Stop processing deleted lines.
* testsuite/sed/sed-does-not-substitute-in-delete-line: New.
diff --git a/testsuite/sed/sed-does-not-substitute-in-deleted-line b/testsuite/sed/sed-does-not-substitute-in-deleted-line
new file mode 100644
index 0000000..6f106e1
--- /dev/null
+++ b/testsuite/sed/sed-does-not-substitute-in-deleted-line
@@ -0,0 +1,2 @@
+echo foo | busybox sed -e /foo/d -e s/foo/bar/ >foo
+cmp foo /dev/null