From 2732217a407c03900145e6f4191936ff6a33945a Mon Sep 17 00:00:00 2001 From: "Roberto E. Vargas Caballero" Date: Fri, 29 Dec 2023 20:27:23 +0100 Subject: [PATCH] ed: Handle correctly lines in substitutions The s command can apply a replace pattern with embedded newlines which modifies the line/index assignament. Using a range in the address fail because afther the call to subline() the next line has to be searched based in the index because the replace could insert newlines. --- TODO | 8 -------- ed.c | 18 +++++++++++++++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/TODO b/TODO index 94b025f..3432591 100644 --- a/TODO +++ b/TODO @@ -50,14 +50,6 @@ ed line . 1g/^$/p -* cat <