DEF_CMD(docs_set_ref)
{
- struct doc *doc = (*ci->pointp)->doc;
+ struct editor *ed = pane2ed(ci->home);
struct mark *m = ci->mark;
if (ci->numeric == 1)
- m->ref.p = list_first_entry(&doc->ed->root.focus->children,
+ m->ref.p = list_first_entry(&ed->root.focus->children,
struct pane, siblings);
else
- m->ref.p = list_last_entry(&doc->ed->root.focus->children,
+ m->ref.p = list_last_entry(&ed->root.focus->children,
struct pane, siblings);
m->ref.ignore = 0;
void __mark_reset(struct doc *d, struct mark *m, int new)
{
- struct point *p, pt;
+ struct point *p;
int i;
struct cmd_info ci = {0};
ci.key = "doc:set-ref";
ci.mark = m;
ci.numeric = 1; /* start */
- pt.doc = d;
- p = &pt;
- ci.pointp = &p;
- key_lookup(d->map, &ci);
+ ci.focus = d->home;
+ key_handle_focus(&ci);
if (m->viewnum == MARK_UNGROUPED)
return;
DEF_CMD(dir_set_ref)
{
- struct doc *d = (*ci->pointp)->doc;
+ struct doc *d = ci->home->data;
struct directory *dr = container_of(d, struct directory, doc);
struct mark *m = ci->mark;
DEF_CMD(text_set_ref)
{
- struct doc *d = (*ci->pointp)->doc;
+ struct doc *d = ci->home->data;
struct mark *m = ci->mark;
struct text *t = container_of(d, struct text, doc);