diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/acme/rows.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/cmd/acme/rows.c b/src/cmd/acme/rows.c index fc03c93c..a078a698 100644 --- a/src/cmd/acme/rows.c +++ b/src/cmd/acme/rows.c @@ -319,7 +319,7 @@ rowdump(Row *row, char *file) uint q0, q1; Biobuf *b; char *buf, *a, *fontname; - Rune *r; + Rune *r, *rp; Column *c; Window *w, *w1; Text *t; @@ -417,11 +417,17 @@ rowdump(Row *row, char *file) Bwrite(b, buf, strlen(buf)); m = min(RBUFSIZE, w->tag.file->b.nc); bufread(&w->tag.file->b, 0, r, m); + if(dodollarsigns && r[0] == '$'){ + rp = runestrdup(r); + expandenv(&rp, (uint*)&m); + }else + rp = r; n = 0; - while(n<m && r[n]!='\n') + while(n<m && rp[n]!='\n') n++; - r[n++] = '\n'; - Bprint(b, "%.*S", n, r); + Bprint(b, "%.*S\n", n, rp); + if(rp != r) + free(rp); if(dumped){ q0 = 0; q1 = t->file->b.nc; |