From: NeilBrown Date: Mon, 14 Aug 2023 00:03:36 +0000 (+1000) Subject: lib-renderlines: erase before drawing an image X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=2afb59f466ea9f9994504f049ad4dd0a5a36649f;p=edlib.git lib-renderlines: erase before drawing an image I lost the Draw:clear for images, so they get drawn on the wrong pane and end up as background. Signed-off-by: NeilBrown --- diff --git a/DOC/TODO.md b/DOC/TODO.md index 4d74a70c..2bc45cd3 100644 --- a/DOC/TODO.md +++ b/DOC/TODO.md @@ -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 diff --git a/lib-renderline.c b/lib-renderline.c index 8f500ff2..fd683774 100644 --- a/lib-renderline.c +++ b/lib-renderline.c @@ -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; diff --git a/tests.d/02-presenter b/tests.d/02-presenter index 3dba9ec1..d5bea691 100644 --- a/tests.d/02-presenter +++ b/tests.d/02-presenter @@ -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