Signed-off-by: NeilBrown <neil@brown.name>
DEF_CMD(docs_get_attr)
{
- struct doc *doc = (*ci->pointp)->doc;
+ struct doc *doc = ci->home->data;
struct mark *m = ci->mark;
bool forward = ci->numeric != 0;
char *attr = ci->str;
static inline char *doc_attr(struct doc *d, struct mark *m, bool forward, char *attr)
{
struct cmd_info ci = {0};
- struct point pt, *p = &pt;
- pt.doc = d;
ci.key = "doc:get-attr";
- ci.pointp = &p;
+ ci.focus = d->home;
ci.mark = m;
ci.numeric = forward ? 1 : 0;
ci.str = attr;
- if (key_lookup(d->map, &ci) == 0)
+ if (key_handle_focus(&ci) == 0)
return NULL;
return ci.str2;
}
DEF_CMD(dir_get_attr)
{
- struct doc *d = (*ci->pointp)->doc;
+ struct doc *d = ci->home->data;
struct mark *m = ci->mark;
bool forward = ci->numeric != 0;
char *attr = ci->str;
DEF_CMD(text_get_attr)
{
- struct doc *d = (*ci->pointp)->doc;
+ struct doc *d = ci->home->data;
struct mark *m = ci->mark;
bool forward = ci->numeric != 0;
char *attr = ci->str;