mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-11 04:27:49 -05:00
render: resize: calculated cursor row *should* never be beyond the screen bottom
This commit is contained in:
parent
88e2ab21b3
commit
e56523f326
1 changed files with 2 additions and 1 deletions
3
render.c
3
render.c
|
|
@ -1229,9 +1229,10 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
|
|||
cursor_row += term->grid->num_rows;
|
||||
cursor_row--;
|
||||
|
||||
assert(cursor_row < term->rows);
|
||||
term_cursor_to(
|
||||
term,
|
||||
min(max(cursor_row, 0), term->rows - 1),
|
||||
max(cursor_row, 0),
|
||||
min(term->cursor.point.col, term->cols - 1));
|
||||
|
||||
term->render.last_cursor.cell = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue