ncplane_put: obliterate the leftmost cell of the multipoint victim #2003

This commit is contained in:
nick black 2021-07-31 02:21:54 -04:00
parent 60e13fb2d2
commit 3875397367
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -1634,8 +1634,8 @@ ncplane_put(ncplane* n, int y, int x, const char* egc, int cols,
lmc = ncplane_cell_ref_yx(n, n->y, --idx); lmc = ncplane_cell_ref_yx(n, n->y, --idx);
} }
// we're now on the leftmost cell of the target glyph. // we're now on the leftmost cell of the target glyph.
int twidth = nccell_cols(targ); int twidth = nccell_cols(lmc);
nccell_release(n, &n->fb[nfbcellidx(n, n->y, idx)]); nccell_release(n, lmc);
twidth -= n->x - idx; twidth -= n->x - idx;
while(--twidth > 0){ while(--twidth > 0){
nccell_obliterate(n, &n->fb[nfbcellidx(n, n->y, n->x + twidth)]); nccell_obliterate(n, &n->fb[nfbcellidx(n, n->y, n->x + twidth)]);