]> git.neil.brown.name Git - edlib.git/commitdiff
lib-renderlines: erase before drawing an image
authorNeilBrown <neil@brown.name>
Mon, 14 Aug 2023 00:03:36 +0000 (10:03 +1000)
committerNeilBrown <neil@brown.name>
Tue, 15 Aug 2023 09:46:42 +0000 (19:46 +1000)
I lost the Draw:clear for images, so they get drawn on the wrong pane
and end up as background.

Signed-off-by: NeilBrown <neil@brown.name>
DOC/TODO.md
lib-renderline.c
tests.d/02-presenter

index 4d74a70c02b8d937f29ffcee83274e4204ea00d1..2bc45cd3dcf805f857f42cb93978d66f4364ba98 100644 (file)
@@ -13,7 +13,7 @@ the file.
 - [ ] check formatting in x11 display.  Wrap causes problems 474/476 of
       render-present.py and elsewhere
 - [ ] check notmuch formatting.  wrap-margin isn't right!
-- [ ] email display: image positioning is wrong.  Maybe they don't get
+- [X] email display: image positioning is wrong.  Maybe they don't get
       erased when moved.
 - [ ] remove tab_right hack by not requiring tail_length after
       final non-eol item
index 8f500ff2f46afd5107e8bb279642fe204a6f3077..fd683774ff9ccfde0daf6df6e1b2936add1dfebc 100644 (file)
@@ -1028,6 +1028,9 @@ static int render_image(struct pane *p safe, struct pane *focus safe,
        char *ssize = attr_find(p->attrs, "cached-size");
        struct xy size= {-1, -1};
 
+       if (dodraw)
+               home_call(focus, "Draw:clear", p);
+
        width = p->parent->w/2;
        height = p->parent->h/2;
 
index 3dba9ec102219d3bbe8cfc4f7acbf452880d9d70..d5bea6913c3bfd5c7e8abd0e0c066515bb2894a0 100644 (file)
@@ -221,4 +221,4 @@ Key ":C-X"
 Display 80,30 136AE3FD2089F71E23116BE983A85809 41,13
 Key ":C-C"
 Display 80,30 748340AC4DCFE9D3B620E7E1B59586F0 41,13
-Close 1420
+Close 1440