mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-25 06:46:36 -04:00
term: reset: combine memset+initializers of vt struct
This commit is contained in:
parent
bfd3eb47ec
commit
f3b3bc1f71
1 changed files with 4 additions and 3 deletions
|
|
@ -1652,9 +1652,10 @@ term_reset(struct terminal *term, bool hard)
|
||||||
free(term->vt.osc8.uri);
|
free(term->vt.osc8.uri);
|
||||||
free(term->vt.osc.data);
|
free(term->vt.osc.data);
|
||||||
|
|
||||||
memset(&term->vt, 0, sizeof(term->vt));
|
term->vt = (struct vt){
|
||||||
term->vt.state = 0; /* STATE_GROUND */
|
.state = 0, /* STATE_GROUND */
|
||||||
term->vt.osc8.begin = (struct coord){-1, -1};
|
.osc8 = {.begin = (struct coord){-1, -1}},
|
||||||
|
};
|
||||||
|
|
||||||
if (term->grid == &term->alt) {
|
if (term->grid == &term->alt) {
|
||||||
term->grid = &term->normal;
|
term->grid = &term->normal;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue