mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05: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
|
||||
(https://codeberg.org/dnkl/foot/issues/21).
|
||||
* 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
|
||||
|
|
|
|||
3
csi.c
3
csi.c
|
|
@ -506,6 +506,9 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (term->render.last_cursor.row == term->grid->rows[i])
|
||||
term->render.last_cursor.row = NULL;
|
||||
|
||||
grid_row_free(term->grid->rows[i]);
|
||||
term->grid->rows[i] = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue