]> git.neil.brown.name Git - edlib.git/commitdiff
Change DAMAGED_CURSOR to propagate down instead of up.
authorNeilBrown <neil@brown.name>
Tue, 12 Jan 2016 03:05:22 +0000 (14:05 +1100)
committerNeilBrown <neil@brown.name>
Tue, 12 Jan 2016 03:05:22 +0000 (14:05 +1100)
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 <neil@brown.name>
core-pane.c
core.h

index 73b837848d0609f08f124f60043d55f2431aeac2..4573679fd0e210eac8d6f71009117189630780c3 100644 (file)
@@ -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 0bcb15e48df9d92132e235d3ae0a38fed43cc065..e025873275430120ff0535e998c43951d8886ea3 100644 (file)
--- 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 {