mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-16 05:34:00 -04:00
selection: add a selection API
This commit is contained in:
parent
1c861e5d69
commit
bcf763d417
6 changed files with 117 additions and 30 deletions
19
terminal.c
19
terminal.c
|
|
@ -14,11 +14,26 @@
|
|||
#define min(x, y) ((x) < (y) ? (x) : (y))
|
||||
#define max(x, y) ((x) > (y) ? (x) : (y))
|
||||
|
||||
void
|
||||
term_damage_rows(struct terminal *term, int start, int end)
|
||||
{
|
||||
assert(start <= end);
|
||||
for (int r = start; r <= end; r++)
|
||||
grid_row(term->grid, r)->dirty = true;
|
||||
}
|
||||
|
||||
void
|
||||
term_damage_rows_in_view(struct terminal *term, int start, int end)
|
||||
{
|
||||
assert(start <= end);
|
||||
for (int r = start; r <= end; r++)
|
||||
grid_row_in_view(term->grid, r)->dirty = true;
|
||||
}
|
||||
|
||||
void
|
||||
term_damage_all(struct terminal *term)
|
||||
{
|
||||
for (int i = 0; i < term->rows; i++)
|
||||
grid_row(term->grid, i)->dirty = true;
|
||||
term_damage_rows(term, 0, term->rows);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue