mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-27 06:46:44 -04:00
term: add term_reset_view() - make view follow end-of-output again
This commit is contained in:
parent
6fa1734468
commit
777863ac3e
2 changed files with 12 additions and 0 deletions
10
terminal.c
10
terminal.c
|
|
@ -362,6 +362,16 @@ term_reverse_index(struct terminal *term)
|
||||||
term_cursor_up(term, 1);
|
term_cursor_up(term, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
term_reset_view(struct terminal *term)
|
||||||
|
{
|
||||||
|
if (term->grid->view == term->grid->offset)
|
||||||
|
return;
|
||||||
|
|
||||||
|
term->grid->view = term->grid->offset;
|
||||||
|
term_damage_view(term);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
term_restore_cursor(struct terminal *term)
|
term_restore_cursor(struct terminal *term)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -392,6 +392,8 @@ void term_damage_rows_in_view(struct terminal *term, int start, int end);
|
||||||
void term_damage_all(struct terminal *term);
|
void term_damage_all(struct terminal *term);
|
||||||
void term_damage_view(struct terminal *term);
|
void term_damage_view(struct terminal *term);
|
||||||
|
|
||||||
|
void term_reset_view(struct terminal *term);
|
||||||
|
|
||||||
void term_damage_scroll(
|
void term_damage_scroll(
|
||||||
struct terminal *term, enum damage_type damage_type,
|
struct terminal *term, enum damage_type damage_type,
|
||||||
struct scroll_region region, int lines);
|
struct scroll_region region, int lines);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue