mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-13 04:27:47 -05:00
render: comments
This commit is contained in:
parent
71c7219b35
commit
d2e0ba3670
1 changed files with 3 additions and 0 deletions
3
render.c
3
render.c
|
|
@ -383,6 +383,8 @@ grid_render(struct terminal *term)
|
|||
if (last_cursor != cursor_as_linear) {
|
||||
int row = last_cursor / term->cols - term->grid->offset;
|
||||
int col = last_cursor % term->cols;
|
||||
|
||||
/* Last cursor cell may have scrolled off screen */
|
||||
if (row >= 0 && row < term->rows) {
|
||||
render_cell(term, buf, &grid_row_in_view(term->grid, row)->cells[col], col, row, false);
|
||||
all_clean = false;
|
||||
|
|
@ -399,6 +401,7 @@ grid_render(struct terminal *term)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Current cursor cell - may be invisible if we've scrolled back */
|
||||
bool cursor_is_visible = false;
|
||||
int view_end = (term->grid->view + term->rows - 1) % term->grid->num_rows;
|
||||
int cursor_row = (term->grid->offset + term->cursor.row) % term->grid->num_rows;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue