tlist_del(&d->views[i].head);
g[i].notify = d->views[i].notify;
g[i].space = d->views[i].space;
+ g[i].marked = d->views[i].marked;
}
for (; i < d->nviews; i++) {
INIT_TLIST_HEAD(&g[i].head, GRP_HEAD);
g[i].notify = NULL;
g[i].space = 0;
+ g[i].marked = 0;
}
free(d->views);
d->views = g;
points_attach(d, ret);
d->views[ret].space = 0;
d->views[ret].notify = c;
+ d->views[ret].marked = 0;
return ret;
}
struct cmd_info ci;
int i;
+ for (i = 0; i < d->nviews; i++)
+ if (d->views[i].notify)
+ d->views[i].marked = 1;
+ else
+ d->views[i].marked = 0;
ci.key = "Release";
for (i = 0; i < d->nviews; i++) {
struct point pt, *ptp = &pt;
struct command *c;
+ if (!d->views[i].marked)
+ /* Don't delete newly added views */
+ continue;
if (d->views[i].notify == NULL)
continue;
ci.pointp = &ptp;
struct docview {
struct tlist_head head;
struct command *notify;
- int space; /* extra space to allocate after a mark */
+ short space; /* extra space to allocate after a mark */
+ short marked; /* being deleted */
} *views;
struct attrset *attrs;
int nviews;