term: reset sixel options when hard resetting the terminal state

This commit is contained in:
Daniel Eklöf 2022-04-26 21:05:17 +02:00
parent aa4c7c5a30
commit 32d9895697
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 12 additions and 0 deletions

View file

@ -68,6 +68,8 @@
scrollback search mode ([#1036][1036]).
* Scrollback search mode not always highlighting all matches
correctly.
* Sixel options not being reset on hard resets (`\Ec`)
[1040]: https://codeberg.org/dnkl/foot/issues/1040
[1036]: https://codeberg.org/dnkl/foot/issues/1036

View file

@ -1929,6 +1929,16 @@ term_reset(struct terminal *term, bool hard)
tll_free(term->alt.scroll_damage);
term->render.last_cursor.row = NULL;
term_damage_all(term);
term->sixel.scrolling = true;
term->sixel.cursor_right_of_graphics = false;
term->sixel.use_private_palette = true;
term->sixel.max_width = SIXEL_MAX_WIDTH;
term->sixel.max_height = SIXEL_MAX_HEIGHT;
term->sixel.palette_size = SIXEL_MAX_COLORS;
free(term->sixel.private_palette);
free(term->sixel.shared_palette);
term->sixel.private_palette = term->sixel.shared_palette = NULL;
}
static bool