return ci.str2;
}
-static inline int doc_set_attr(struct point *pt, char *attr, char *val)
+static inline int doc_set_attr(struct pane *p, struct point *pt,
+ char *attr, char *val)
{
struct cmd_info ci = {0};
- struct doc *d = pt->doc;
ci.key = "doc:set-attr";
- ci.focus = d->home;
+ ci.focus = p;
ci.mark = &pt->m;
ci.str = attr;
ci.str2 = val;
do {
/* TEMP HACK - please fix */
- doc_set_attr(esi->end, "highlight", NULL);
+ doc_set_attr(esi->target, esi->end, "highlight", NULL);
wch = mark_next(d, &esi->end->m);
if (wch == WEOF)
return 1;
doc_del_view(ci->focus, &esi->watch);
/* TEMP HACK - please fix */
- doc_set_attr(esi->end, "highlight", NULL);
+ doc_set_attr(esi->target, esi->end, "highlight", NULL);
point_free(esi->end);
esi->end = NULL;
mark_free(esi->start);
}
/* TEMP HACK - please fix */
- doc_set_attr(esi->end, "highlight", NULL);
+ doc_set_attr(esi->target, esi->end, "highlight", NULL);
ci2.focus = esi->target;
m = mark_dup(esi->start, 1);
ci2.mark = m;
memset(&ci2, 0, sizeof(ci2));
point_to_mark(esi->end, m);
/* TEMP HACK - please fix */
- doc_set_attr(esi->end, "highlight","fg:red,inverse");
+ doc_set_attr(esi->target, esi->end, "highlight","fg:red,inverse");
ci2.key = "Move-View-Pos";
ci2.focus = esi->target;
ci2.mark = &esi->end->m;