mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-06 03:20:26 +00:00
Scrolling: cell_release() cleared rows #482
This commit is contained in:
parent
a4e1d68786
commit
f356af418b
@ -456,6 +456,7 @@ int ncplane_resize_internal(ncplane* n, int keepy, int keepx, int keepleny,
|
||||
int sourceline = keepy;
|
||||
for(itery = 0 ; itery < ylen ; ++itery){
|
||||
int copyoff = itery * xlen; // our target at any given time
|
||||
// FIXME in memset()s here of existing text, don't we need cell_release()?
|
||||
// if we have nothing copied to this line, zero it out in one go
|
||||
if(itery < keepy || itery > keepy + keepleny - 1){
|
||||
memset(fb + copyoff, 0, sizeof(*fb) * xlen);
|
||||
@ -1219,6 +1220,9 @@ int ncplane_putc_yx(ncplane* n, int y, int x, const cell* c){
|
||||
if(n->y == n->leny - 1){
|
||||
n->logrow = (n->logrow + 1) % n->leny;
|
||||
cell* row = n->fb + nfbcellidx(n, n->y, 0);
|
||||
for(int clearx = 0 ; clearx < n->lenx ; ++clearx){
|
||||
cell_release(n, &row[clearx]);
|
||||
}
|
||||
memset(row, 0, sizeof(*row) * n->lenx);
|
||||
}else{
|
||||
++n->y;
|
||||
|
Loading…
Reference in New Issue
Block a user