d = p->data;
if (strcmp(attr, "name") == 0)
return d->name;
- return doc_attr(d, NULL, 0, attr);
+ return doc_attr(p, NULL, 0, attr);
}
DEF_CMD(docs_get_attr)
if (a)
return a;
if (p->point) {
- a = doc_attr(p->point->doc, NULL, 0, key);
+ a = doc_attr(p, NULL, 0, key);
if (a)
return a;
}
return ci.str;
}
-static inline char *doc_attr(struct doc *d, struct mark *m, bool forward, char *attr)
+static inline char *doc_attr(struct pane *dp, struct mark *m, bool forward, char *attr)
{
struct cmd_info ci = {0};
ci.key = "doc:get-attr";
- ci.focus = d->home;
+ ci.focus = dp;
ci.mark = m;
ci.numeric = forward ? 1 : 0;
ci.str = attr;
buf_append(&ret, ch);
continue;
}
- val = doc_attr(d, m, 1, buf);
+ val = doc_attr(dp, m, 1, buf);
if (!val)
val = "-";
if (*n != ':') {