From: NeilBrown Date: Tue, 12 Jan 2016 03:05:22 +0000 (+1100) Subject: Change DAMAGED_CURSOR to propagate down instead of up. X-Git-Tag: lca2016~23 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=e7ee3a9eef8ceca731650821bfbe830d0cb2c028;p=edlib.git Change DAMAGED_CURSOR to propagate down instead of up. Now that the render draws the cursor, rather than the display knowing where it is, we want DAMAGED_CURSOR to propagate down. Signed-off-by: NeilBrown --- diff --git a/core-pane.c b/core-pane.c index 73b83784..4573679f 100644 --- a/core-pane.c +++ b/core-pane.c @@ -81,7 +81,7 @@ void pane_damaged(struct pane *p, int type) if ((p->damaged | type) == p->damaged) return; p->damaged |= type; - type = DAMAGED_CHILD | (type & DAMAGED_CURSOR); + type = DAMAGED_CHILD; p = p->parent; } } @@ -133,7 +133,7 @@ static void __pane_refresh(struct cmd_info ci) ci2.extra |= DAMAGED_CONTENT; if (ci2.extra & DAMAGED_CONTENT) ci2.extra |= DAMAGED_CURSOR; - damage &= DAMAGED_SIZE | DAMAGED_EVENTS; + damage &= DAMAGED_SIZE | DAMAGED_EVENTS | DAMAGED_CURSOR; ci2.comm = p->handle; ret = p->handle->func(&ci2); if (ret == 0) diff --git a/core.h b/core.h index 0bcb15e4..e0258732 100644 --- a/core.h +++ b/core.h @@ -309,8 +309,7 @@ void key_add_range(struct map *map, char *first, char *last, struct command *comm); struct command *key_register_prefix(char *name); -/* DAMAGED_SIZE and DAMAGED_EVENTS propagate down. - * DAMAGED_CURSOR propagates up. +/* DAMAGED_CURSOR, DAMAGED_SIZE and DAMAGED_EVENTS propagate down. * If any flag is set on children, DAMAGED_CHILD is set. */ enum {