sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit b6f466d4b159e75ccc905fff7b608a72e1b0f4a0
parent 79adf5f3a3210587eb7097d14fe267fde830b3f1
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed Dec 16 20:18:09 +0100

call to addpre() in every iteration of subline()

It is needed to call to addpre(), because in other
case the prefix of all the occurrences before
the target will not be copied to the result
string.

Diffstat:
ed.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ed.c b/ed.c @@ -991,10 +991,10 @@ subline(int num, int nth) siz = 0; for (m = match(num); m; m = rematch(num)) { + addpre(&s, &cap, &siz); if (--nth > 0) continue; changed = 1; - addpre(&s, &cap, &siz); addsub(&s, &cap, &siz); if (nth == 0) break;