--- ed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ed.c b/ed.c index ae9e6d7..6c05649 100644 --- a/ed.c +++ b/ed.c _AT_@ -1005,10 +1005,10 @@ subline(int num, int nth) static size_t siz, cap; i = changed = siz = 0; - for (m = match(num); m; m = rematch(num)) { + for (m = match(num); m && *lastmatch; m = rematch(num)) { addpre(&s, &cap, &siz); changed |= addsub(&s, &cap, &siz, nth, ++i); - if (eol || bol) + if (eol || bol || matchs[0].rm_eo - matchs[0].rm_so == 0) break; } if (!changed) -- 2.9.0Received on Mon Jul 25 2016 - 03:04:29 CEST
This archive was generated by hypermail 2.3.0 : Mon Jul 25 2016 - 03:12:22 CEST