mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-28 06:46:38 -04:00
csi: \E[3J: reset render.last_cursor.row if necessary
This fixes a crash that occurred when the last rendered cursor cell had scrolled off screen, and \E[3J (clear scrollback) was executed.
This commit is contained in:
parent
fb001ee7a7
commit
bf57d0c606
2 changed files with 5 additions and 0 deletions
|
|
@ -55,6 +55,8 @@
|
||||||
* Glyphs overflowing into surrounding cells
|
* Glyphs overflowing into surrounding cells
|
||||||
(https://codeberg.org/dnkl/foot/issues/21).
|
(https://codeberg.org/dnkl/foot/issues/21).
|
||||||
* Sixel images being erased when printing text next to them.
|
* Sixel images being erased when printing text next to them.
|
||||||
|
* Crash when last rendered cursor cell had scrolled off screen and
|
||||||
|
`\E[J3` was executed.
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
3
csi.c
3
csi.c
|
|
@ -506,6 +506,9 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (term->render.last_cursor.row == term->grid->rows[i])
|
||||||
|
term->render.last_cursor.row = NULL;
|
||||||
|
|
||||||
grid_row_free(term->grid->rows[i]);
|
grid_row_free(term->grid->rows[i]);
|
||||||
term->grid->rows[i] = NULL;
|
term->grid->rows[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue