This gets set when a pane is being closed, and prevents repeated
close when a child tried to close a parent.
Signed-off-by: NeilBrown <neil@brown.name>
struct cmd_info ci2 = *ci;
int ret = 0;
+ if (p->damaged & DAMAGED_CLOSED)
+ return;
+
if (p->focus == NULL)
p->focus = list_first_entry_or_null(
&p->children, struct pane, siblings);
void pane_close(struct pane *p)
{
struct pane *c;
+ if (p->damaged & DAMAGED_CLOSED)
+ return;
+ p->damaged |= DAMAGED_CLOSED;
pane_check(p);
while (!list_empty(&p->children)) {
DAMAGED_SIZE = 2, /* these three each impose the next. */
DAMAGED_CONTENT = 4,
DAMAGED_CURSOR = 8,
+
+ DAMAGED_CLOSED = 1024,
};
struct pane *pane_register(struct pane *parent, int z,